Archive

Archive for the ‘Visual Studio’ Category

Visual Studio Code Updates for Java Developers: Rename, Logpoints, TestNG and More

December 14th, 2018 No comments

As we seek to continually improve the Visual Studio Code experience for Java developers, we’d like to share couple new features we’ve just released. Thanks for your great feedback over the year, we’re heading into the holidays with great new features we hope you’ll love. Here’s to a great 2019!

Rename

With the new release of the Eclipse JDT Language Server, we’re removing the friction some developers experienced in ensuring renamed Java classes perpetuate into the underlying file in Visual Studio Code. With the update, when a symbol is renamed the corresponding source file on disk is automatically renamed, along with all the references.

Debugger

VS Code Logpoints is now supported in the Java Debugger. Logpoints allow you to inspect the state and send output to debug console without changing the source code and explicitly adding logging statements. Unlike breakpoints, logpoints don’t stop the execution flow of your application.

To make debugging even easier, you can now skip editing the “launch.json” file by either clicking the CodeLens on top of the “main” function or using the F5 shortcut to debug the current file in Visual Studio Code.

TestNG support

TestNG support was added to the newest version of the Java Test Runner. With the new release, we’ve also updated the UI’s of the test explorer and the test report. See how you can work with TestNG in Visual Studio Code.

We’ve also enhanced our JUnit 5 support with new annotations, such as @DisplayName and @ParameterizedTest.

Another notable improvement in the Test Runner is that we’re no longer loading all test cases during startup. Instead, the loading now only happens when necessary, e.g. when you expand a project to see the test classes in the Test viewlet. This should reduce the resource needed on your environment and enhance the overall performance of the tool.

Updated Java Language Pack

We’ve included the recently released Java Dependency Viewer to the Java Extension Pack as more and more developers are asking for the package view, dependency management and project creation capability provided by this extension. The viewer also provides a hierarchy view of the package structure.

Additional language support – Chinese

As the user base of Java developers using Visual Studio Code is expanding around the world, we decided to make our tool even easier to use for our users internationally by offering translated UI elements. Chinese localization is now available for Maven and Debugger, it will soon be available for other extensions as well. We’d also like to welcome contributions from community for localization as well.

IntelliCode and Live Share

During last week’s Microsoft Connect() event, we shared updates on the popular Visual Studio Live Share and Visual Studio IntelliCode features. The new IDE capabilities – all of which support Java – provide you with even better productivity with enhanced collaboration and coding experience that you can try now in Visual Studio Code.

Just download the extensions for Live Share and IntelliCode to experience those new features with your friends and co-workers. Happy coding and happy collaborating!

Attach missing sources

When you navigate to a class in some libraries without source code, you can now attach the missing source zip/jar using the context menu “Attach Source”.

We love your feedback

Your feedback and suggestions are especially important to us and will help shaping our products in future. Please help us by taking this survey to share your thoughts!

Try it out

Please don’t hesitate to try Visual Studio Code for your Java development and let us know your thoughts! Visual Studio Code is a lightweight and performant code editor and our goal is to make it great for the entire Java community.

Xiaokai He, Program Manager
@XiaokaiHeXiaokai is a program manager working on Java tools and services. He’s currently focusing on making Visual Studio Code great for Java developers, as well as supporting Java in various of Azure services.

 

Get to code: How we designed the new Visual Studio start window

December 13th, 2018 No comments

By now, many of you may have noticed a very prominent change to the launch of Visual Studio in Visual Studio 2019 Preview 1. Our goal with this new experience is to provide rapid access to the most common ways that developers get to their code: whether it’s cloning from an online repository or opening an existing project.

New start window in Visual Studio 2019

A month ago, we shared a sneak peek of the experience (in the blog post A preview of UX and UI changes) and mentioned the research and observation that we used as input into the design and development. This is the story about how we got there.

How & why we began this journey

Two years ago, we reinvented the Visual Studio installation experience to offer developers the ability to install exactly what they need and reduce the installation footprint of Visual Studio. We broke Visual Studio down into smaller packages and components and then grouped them together into development-focused workloads (which are bundles of packages and components). We quickly realized that the installation was just one piece of the journey our users take when they are getting started with Visual Studio.

We began to think more broadly – beyond just the installation of the bits, to explore the developer journey of getting to code. This journey starts from the moment you think about that great idea for an app all the way to writing your first lines of code, and integrating Visual Studio into your daily routine. To help us understand what developers were doing throughout their first launch, we built a data informed model of the customer journey.

Our Visual Studio Customer Journey

These insights helped improve installation success rates and address common failures but lacked the ability to answer questions around why some users drop off from one step to the next and how do we make sure Visual Studio meets the need of millions of developers? Some of you may even be trying to better understand how to make your own consumer or business customers more successful with your products.

So, from there we turned to existing mechanisms like surveys, interviews, social media (blogs), and A/B experimentation to help us understand where and how to improve these experiences. The surveys received an overwhelming number of responses (thank you to those of you who contributed!) and provided us with a foundation of anecdotes that helped us understand our individual users even more. They helped us recognize the different types of users coming into our “front door”, which is to say the first place they learn about Visual Studio and decide to download it. We identified through early cohort analysis, that almost half (50%) of users downloading were brand new to Visual Studio (but not necessarily new to coding) and only some of those users came back to Visual Studio for a second time. This was a surprising moment for us as we had no idea why this was happening!

Going beyond the data

We knew we needed deeper insights into how we could help new users be successful with their first time in Visual Studio and assist them in making the best choices along their journey. Fundamentally, we wanted to identify what the “Magic Moment” would be for them in Visual Studio. The “Magic Moment” is a phrase commonly used by product teams that maps a set of events or an experience a user has with a product that transforms them from a casual user trying something out to an avid, loyal user who finds success and even promotes the product. This moment is at the very core of identifying patterns to indicate users who will integrate a product or tool into their daily routine. We didn’t know what our Magic Moment was just yet, but we had a lot of ideas on what we believed it might be, so we asked ourselves:

Is there something new Visual Studio users do in the IDE that indicates they will return or abandon after 5 minutes?

We set out to answer this question by:

  1. Observing developers, both brand new to Visual Studio and seasoned, as they find Visual Studio to download, configure, and start writing code.
  2. Identifying the problems that they encountered throughout their journey to code.
  3. Building hypotheses and concepts around getting to a “Magic Moment.”
  4. Validating the hypotheses and concepts via an iterative process of weekly testing and experimentation.

Our iterative process from interns to external users

We started by asking our summer interns to install and use Visual Studio for the first time in our user experience (UX) lab and document their journey. We were surprised at how long and difficult the journey from download to writing and running code was for them. We also gained insights into their expectations for Visual Studio based on other editors and IDEs they had previous experience with.

Our first step was simple: we gave participants a clean virtual machine with only Windows 10 installed and asked them to find, install, use Visual Studio, and “do whatever is natural to you to get started.”

We then just watched…

One of our participants in the User Experience lab

Turns out even students think the 40 year-old concept of writing a “hello world” app is a great starting place. What also became extremely clear to us was that moment when users were writing and running code – we saw them become more engaged with Visual Studio and having fun. We saw an emotional change when they wrote their own code, compiled it, fixed some things, and ran it. We had a strong inkling that we were even closer to the “Magic Moment.”

We then scaled up our research to bring in more new and experienced developers every week. We tested out many ideas using low fidelity mockups built in PowerPoint and eventually moved to higher fidelity prototypes. We tried variations of tasks and UIs as we tested our assumptions. There were multiple problems to solve but one of the most significant became clear when we saw new Visual Studio developers struggle when trying to open code or create a new project. The first view of Visual Studio was overwhelming with no clear guidance of what they should do first. So, we set out to focus on that stage of the journey in our designs and storyboards for Visual Studio 2019. The design process looked a little something like this:

Visualizing the friction points in the customer journey

Evolution of our start window designs

Bringing all our insights into Visual Studio 2019

From all the design explorations, experiments, and observations, evolved an idea of the start window which would offer a focused experience to quickly get you to writing those first lines of code. Given our insights, we wanted to ensure users, especially those new to Visual Studio (some who are already experienced in other development tools), could quickly experience that “Magic Moment” of writing their first lines of code and successfully run it each and every time.

The start window would support new Visual Studio users by:

  1. Highlighting the choices, they must make during the early, crucial steps of getting started with Visual Studio.
  2. Removing distractions and providing suggestions for the best path forward.
  3. Enabling a search and filter focused experience for creating a new project.
  4. Promoting a streamlined online repository-first workflow.

Developers who are already well-versed and experienced with Visual Studio might be wondering what’s in it for them. What we’ve heard from experienced developers is that onboarding junior developers is very challenging, so we believe the new start window is a step towards ensuring they are more successful in getting to their code each time they open the IDE. We will also continue to preserve and enable existing workflows in the start window to support the muscle memory that experienced users have established with Visual Studio. Lastly, seasoned developers in the user experience lab were delighted by the new “Clone and check out code” experience which brings your online repositories right to your fingertips on launch.

Anatomy of the start window

We know the list of recent projects and solutions is one of the most common ways developers open code, so it was very important that we maintain this list in the most prominent part of the start window. We also knew it was VERY important to not break existing flows where developers open projects/solutions from the desktop (by double-clicking) – so the start window will never show in this flow, as your code will always take priority and open immediately.

Bringing a more focused, source-first experience of clone and check out code (like the Start Page had) to the forefront of Visual Studio was an opportunity to not only show new users the power of source providers like GitHub and Azure DevOps. We have also heard from our research with developers that this action is a more prominent part of a their daily workflow.

Opening a project or solution brings forward the concept of Visual Studio project and solution files that you can click on to open your entire codebase if you have an MSBuild-based solution. But if you use a non-MSBuild build system, such as CMake, then we would recommend opening a local folder instead. We’ve been investing in support to allow you to browse, edit, build, and debug any code without a .sln or project file. You can learn more about Open Folder, including how to configure a different build system to work with it, in our documentation. In addition, if you want to browse loose files in Visual Studio, you can just open the containing folder and pick up the file from the folder view of Solution Explorer.

Creating a new project is a big part of getting to your code in Visual Studio even when it’s prototyping some throwaway code in a simple template (like the Console App) or trying out the capabilities of a new platform or language for the first time. Based on the workloads you install, you’ll always see the most commonly used templates first. We’ve observed that developers first think about the kind of application they want to build (a mobile app, a website, etc.) and not the language – so we removed the language centric tree hierarchy and have improved searching and filtering to help you get to the right template more quickly. You’ll also find a more prominent list of recently used templates so you can quickly get back to your favorite template with a single click.

Lastly, continue without code offers developers a one-time escape from the window for the times when a different action is needed to start work (like joining a Live Share collaboration session, or attaching to a process). Alternatively, hitting the ESC key will also dismiss the window and immediately bring up the IDE. If there are other scenarios that you perform frequently and think should have a home on the start window (like for example attaching to a debugger), please upvote or create a suggestion in our Developer Community.

What’s next for this experience

In just a week, after releasing Visual Studio 2019 Preview 1, we’ve heard developers tell us the start window provides a “focused way to get to the most common things.” We’re already working on some of your feedback, such as support for Team Foundation Version Control and better scan ability in the recent solutions/projects list.

The start window experience is just one part of the journey we’re on to continue to streamline the onboarding experience to Visual Studio. Our longer-term vision includes improvements like reducing the number of choices required to download and install and offering relevant samples and tutorials to assist when learning a new language or platform.

Tell us what you think

As you can tell from the journey we’ve taken to get here, your feedback is essential to making this experience better. We’d love to have you try it out for a few hours in your everyday work. If it still doesn’t jive with you, then you can revert to the previous Visual Studio ‘start’ behavior. Go to Tools > Options and search for ‘Preview Features’ which will allow you to configure this setting along with a few other preview features. Alternatively, you can find the option in Tools > Options | Environment | Startup.

Tools | Options settings for Preview Features

After you’ve experienced Visual Studio 2019 Preview 1, please help us make this the best Visual Studio yet by letting us know what you like or tell us what is not working well for you. And of course, if you run into any issues, please let us know by using the Report a Problem tool in Visual Studio. You can also head over to the Visual Studio Developer Community to track your issue or, even better, suggest a feature, ask questions, and find answers from other developers.

Cathy Sullivan, Principal Program Manager, Visual Studio Platform
@cathysull

Cathy Sullivan is a Principal Program Manager on the Visual Studio Acquisition team focused on ensuring developers have a smooth onboarding experience for the first time and every time with Visual Studio. She has worked on many Visual Studio Platform teams building C#/VB language features, core UI/Shell features such as Solution Explorer and designed the beloved dark theme used by many developers.

Categories: Visual Studio, Visual Studio 2019 Tags:

A Year of Q#

December 11th, 2018 No comments

The Quantum Architecture and Computation group launched Q#, our quantum computing programming language, a year ago on December 11th, 2017.

Q# 0.1 was the result of a lot of hard work from a small, dedicated team of developers, researchers, and program managers. We had made the decision to build a domain-specific language for quantum computing about six months before we launched, so we were on a very tight schedule. We were lucky to have a great team of people who all pitched in and did what needed to be done so that we could meet our extremely aggressive timetable.

Start!

Inside the team, we speculated on what level of interest Q# would attract. We hoped that we might receive a few hundred downloads, but we were blown away when we crossed 1,000 users by about 9 hours after launch. That said, with so many users installing the Quantum Development Kit and trying to write simple programs in it, bugs started popping up. In order to deliver the best experience for our users, we released a patch in January that addressed issues like floating-point literals that were handled incorrectly in certain locales, and allowed the simulator to run on older machines without vector instructions support.

We also addressed portability feature requests in our 0.2 release in February 2018, which saw us move from the .NET Framework to the open-source, cross-platform .NET Core. This allowed us to easily support macOS and Linux as well as Windows for building and running Q# code. We also added support for VS Code on all platforms (the 0.1 release was limited to Visual Studio on Windows). As part of the 0.2 release, we were able to make the majority of our libraries and samples available under an MIT license.

Long Hot Summer

We decided to take advantage of one of our team members’ expertise in organizing coding competitions and run a Q# coding competition to engage non-quantum developers with Q# and quantum computing. After a couple of months of preparation, we ran the Q# Coding Contest in early July. Again, the results exceeded our expectations: 514 participants in the warmup round, and 389 in the actual contest. 100 participants solved all the problems, and a lot of them even asked for more challenging ones!

To help make Q# and quantum computing more accessible to the public, we also launched self-paced programming tutorials: the Quantum Katas. We’re up to 10 katas already, and more are coming!

Spring, Summer, Autumn

We started planning the next major release in the spring of 2018, after shipping our 0.2 release: we wanted to rebuild our compiler to work as a language server, to give Q# developers the same interactive error checking and IntelliSense features they’re used to for languages like C# and F#. We knew this would be a huge amount of work and would require a significant re-architecture of the compiler in order to work incrementally. We didn’t want to wait longer to do this work, though, because we wanted to give our users the kind of modern programming environment they’re used to.

We spent the spring and summer re-architecting and rewriting the Q# compiler and shipped the new Q# compiler as our 0.3 release at the end of October.

The 0.3 release also includes a new, open source quantum chemistry library. This library integrates with NWChem, a powerful and popular open source computational chemistry package. The integration is based on the open source Broombridge schema.

Whatever Next

What’s next for Q#? No spoilers (yet!).

The last blog post of the calendar, scheduled for December 24th, will look at some of the things we’re considering for Q# in the coming year.

Until then, enjoy the holidays!

Congratulations to everyone who can figure out what the section titles have in common…

Alan Geller, Software Architect, Quantum Software and Applications
@ageller

Alan Geller is a software architect in the Quantum Architectures and Computation group at Microsoft. He is responsible for the overall software architecture for Q# and the Microsoft Quantum Development Kit, as well as other aspects of the Microsoft Quantum software program.

Categories: Q#, Quantum, Visual Studio Tags:

New Benefits in Visual Studio Subscriptions

December 11th, 2018 No comments

Last week at Microsoft Connect();, we announced two new benefits to assist cloud migration for our users who have Visual Studio Subscriptions. If you missed the event or want to watch the on-demand trainings, check out the Connect(); event page. If you’re a current Visual Studio subscriber, activate your new benefits to get started right away. To learn more about our developer subscriptions and programs visit the Visual Studio website.

Here are more details on the two new benefits:

CAST Highlight

Developers need critical insights on their software when migrating to the cloud. With CAST Highlight, Visual Studio Enterprise subscribers can rapidly scan their application source code to identify the cloud readiness of their applications for migration to Microsoft Azure and monitor progress of their app both during and after a migration. Check out this video from CAST to see it in action.

Visual Studio Enterprise subscribers can get a free, full-featured one-month subscription to CAST Highlight for up to five apps per subscriber.

UnifyCloud’s CloudPilot

Developers also need solutions that enable quick and easy app migration to the cloud. CloudPilot helps move apps to Microsoft Azure in a few easy steps, including identifying all required changes down to the line of code for successful migration to containers, virtual machines, App Service, Azure SQL, and SQL Managed Instance. See this video from UnifyCloud to learn more about CloudPilot.

Visual Studio Enterprise subscribers are eligible for two 90-day free licenses to the full-featured CloudPilot, while Visual Studio Professional subscribers can take advantage of one 30-day license to scan apps and databases of millions of lines of code in minutes.

Log into the Visual Studio Subscriptions portal at https://my.visualstudio.com today to get your new benefits.

Let us know what you want to see with the Visual Studio Subscriptions by sharing your feedback, suggestions, thoughts, and ideas in the comments below!

Lan Kaim, Director of Product Marketing

Lan is a Director on the Azure marketing team where she is responsible for the developer subscription business.

New Preview label for Visual Studio extensions

December 7th, 2018 No comments

Visual Studio extensions can now be marked with a Preview label which is shown very clearly on the Visual Studio Marketplace. This gives your customers clear expectations that this version could contain issues as you are actively developing new features. You can get feedback from your users earlier, test out new code changes to improve your extension, and continue to provide a stable version for your users that may require it.

Determining the quality of an extension is today an exercise left to the extension user. If an extension isn’t recommended by a friend, coworker or other trusted person, all we can do is to look at the number of downloads, the star rating, and reviews to determine if we perceive the quality to be high enough for us to try out the extension.

The new preview label explicitly communicates some important details to the consumer about what to expect from the extension. This helps them to understand that the extension may not be feature complete and may contain bugs. It can also help to communicate to them that feedback is welcome to improve the extension before its final release and the preview label removed.

If the version of your extension is less than one (i.e. v0.5) then it will likely benefit from adding the preview label.

Add the preview label

In your extension’s .vsixmanifest file, add the new <Preview> element to the <Metadata> node.

<Metadata>
  <Identity Id="[guid]" Version="0.8" Language="en-US" Publisher="My name" />
  <DisplayName>Extension name</DisplayName>
  <Description>Extension description.</Description>
  <Icon>Resources\Icon.png</Icon>
  <Preview>true</Preview>
</Metadata>

Now upload your extension to the Visual Studio Marketplace to see the new preview label show up. If your extension isn’t uploaded but referenced by a link, then there is a checkbox you can check to add the preview label when you edit your linked extension on the Marketplace.

It’s important to note that the extension will not change behavior in any way due to the addition of the preview label.

Try it out

If you have any applicable extensions, then use the preview label to better communicate the right expectations to your users and get a better chance at higher ratings.

Mads Kristensen, Senior Program Manager
@mkristensen

Mads Kristensen is a senior program manager on the Visual Studio Extensibility team. He is passionate about extension authoring, and over the years, he’s written some of the most popular ones with millions of downloads.

Visual Studio Live Share for real-time code reviews and interactive education

December 6th, 2018 No comments

Collaborating with your team using Visual Studio Live Share keeps getting easier! Since making Live Share available for the public use at BUILD last May, we’ve heard so much great feedback from our users, which has helped guide us in continuing to build a tool that truly enables developers to collaborate in all the ways they need from the comfort of their favorite tools. Your feedback has pointed us towards new collaboration scenarios that we had not previously thought of (e.g. technical interviews and hackathons), as well helped us prioritize releasing some of the biggest feature requests and issues, like sharing multi-root workspaces, making it easier to visually interact with a Live Share session, as well as allowing guests to start a debugging session. We’ve come a long way, and we have so much more collaboration goodness to bring you! If you haven’t checked out Live Share yet, get started collaborating today!

Live Share + Visual Studio 2019

After installing the Visual Studio 2019 Preview, you’ll immediately notice a Live Share button in the top-right corner of your IDE. Starting with Visual Studio 2019, Live Share is now installed by default with most workloads, making it easier than ever to start collaborating with your teammates.

For a quick overview of how to get started with Live Share, we have a walkthrough for you to watch:

We’ve also been working to bring features to enable better Live Share support for Visual Studio users. For our public preview release, we announced universal language support for all languages and platforms. We’re happy to say we’ve continued to expand this capability and have recently added language support for more languages, including: C++, VB.NET, and Razor, with F# and Python on the way soon.

Additionally, one of the top feature requests from Visual Studio users of Live Share was enabling Solution View for guests. Now, you will see the project-based view of the codebase, rather than the “folder view”. The guests and host no longer have different views into the project, and now have the same view, as if they were all developing locally.

Real-time code reviews

Another big area of collaboration among teams comes when committing your code and conducting reviews. Live Share wants to further enhance that experience and offer new ways to work with your teammates.

When a host shares their code during a Live Share session, guests will have access to the shared source control diffs. Available in both Visual Studio (with the Pull Requests for Visual Studio extension), and Visual Studio Code, guests can view the diffs to get context on what changes have been made before or during a session. This can help with having real-time code reviews in your tool of choice, or even figuring out a merge conflict.

Another aspect of the reviewing experience is comments. For that, Live Share enables in-line commenting. While in a session, participants can add comments to code for others to see in real-time. You can use this for making notes about certain changes found in a shared diff or making a to-do list of things to accomplish during the collaboration session.

To further enhance your code review experience, and ensure you can use the tools you’re already familiar with, we’re excited to announce that GitLens has added support for Live Share! As a guest, you can visualize code authorship with Git blame annotations, navigate through line/file/repo history, and view diffs between arbitrary baselines (e.g commits, branches, or tags).

Collaboration comes in so many different forms, so working with the extension ecosystem to holistically address the various ways developers work together is integral to Live Share. We’ve also partnered with other 3rd party extensions to augment Live Share collaboration sessions with their additional capabilities, like auto-sharing servers created by Live Server, sharing Test Explorer results with guests, and letting guests execute code as it is written with Quokka.js.

Interactive Education

The primary goal of Visual Studio Live Share is to enable developers to collaborate with each other more easily, and education is a scenario we care deeply about. Whether you’re mentoring a developer on your team, or giving a lecture to a classroom, Live Share provides participants with an experience that is more engaging and truly personalized to everyone’s learning needs.

While Live Share was already applicable to education, we’ve specifically addressed the following key feedback items, in order to ensure it’s further optimized for the diverse needs of instructors and students everywhere:

Get Collaborating!

If you haven’t had a chance, give Visual Studio Live Share a try! The extension is also available for download for Visual Studio 2017 and Visual Studio Code users. Additionally, it available as a default install option in the new Visual Studio 2019 Preview.

For more information about using Live Share, please check out our docs! We’re so grateful for all the amazing feedback we’ve received from you, and love hearing more. We talked a about a few new use cases we’ve optimized for based on your feedback, and we’re so excited for all the new ways we can enhance how you collaborate. As always, feel free to send us your feedback by filing issues and feature requests on GitHub.

Happy Collaborating!

Jon Chu, Program Manager
@jonwchuJon is a Program Manager on the Visual Studio Live Share team bringing collaboration tools to developers, enabling them to tell their own unique stories. Prior to Live Share he’s worked on XAML tooling and NuGet.

Visual Studio IntelliCode supports more languages and learns from your code

December 5th, 2018 No comments

At Build 2018, we announced Visual Studio IntelliCode, a set of AI-assisted capabilities that improve developer productivity. IntelliCode includes features like contextual IntelliSense code completion recommendations, code formatting, and style rule inference.

IntelliCode has just received some major updates that make its context-sensitive AI-assisted IntelliSense recommendations even better. You can download the updated IntelliCode Extension for Visual Studio and IntelliCode Extension for Visual Studio Code today! The Visual Studio extension already works with the newly-release Visual Studio 2019 Preview 1.

AI-assisted IntelliSense recommendations based on your language of choice

Many of you have requested IntelliCode recommendations for your favorite languages. With this update, we’re excited to add four more languages to the list that can get AI-assisted IntelliSense recommendations. In our extension for Visual Studio, C++ and XAML now get IntelliCode alongside existing support for C#. In our extension for Visual Studio Code, TypeScript/JavaScript and Java are added alongside existing support for Python.

We’ll be sharing more details about IntelliCode’s support for each language on their respective blogs [C++ | TypeScript and JavaScript | Java]

AI-assisted IntelliSense for C# with recommendations based on your own code

Until now, IntelliCode’s recommendations have been based on learning patterns from thousands of open source GitHub repos. But what if you’re using code that isn’t in that set of repos? Perhaps you use a lot of internal utility and base class libraries, or domain-specific libraries that aren’t commonly used in open source code, and would like to see IntelliCode recommendations for them too? If you’re using C#, you can now have IntelliCode learn patterns and make recommendations based on your own code!

When you open Visual Studio after installing the updated IntelliCode Extension for Visual Studio, you’ll see a prompt that lets you know about training on your code, and will direct you to the brand new IntelliCode page to get started. You can also find the new page under View > Other Windows > IntelliCode.  Once training is done, we’ll let you know about the top classes we found usage for, so you can just open a C# file and start typing to try out the new recommendations. We keep the trained models secured, so only you and those who have been given your model’s sharing link can access them–so your model and what it’s learned about your code stay private to you. See our FAQ for more details.

Check out Allison’s video below to see how this new feature works.

Get Involved

As you can see, IntelliCode is growing new capabilities fast. Get the IntelliCode Extension for Visual Studio and the IntelliCode Extension for Visual Studio Code to try right away, and let us know what you think.  You can also find more details about the extensions in our FAQ.

IntelliCode and its underlying service are in preview at present. If you hit issues using the new features and you’re using Visual Studio, use the built-in Visual Studio “Report a Problem” option, and mention IntelliCode in your report. If you’re a Visual Studio Code user, just head over to our GitHub issues page and report your problem there.

If you want to learn more or keep up with the project as we expand the capabilities to more scenarios and other languages, please sign up for email updates. Thanks!

Mark Wilson-Thomas, Senior Program Manager

@MarkPavWT  #VSIntelliCode

Mark is a Program Manager on the Visual Studio IntelliCode team. He’s been building developer tools for over 10 years. Prior to IntelliCode, he worked on the Visual Studio Editor, and on tools for Office, SQL, WPF and Silverlight.

Making every developer more productive with Visual Studio 2019

December 4th, 2018 No comments

Today, in the Microsoft Connect(); 2018 keynote, Scott Guthrie announced the availability of Visual Studio 2019 Preview 1. This is the first preview of the next major version of Visual Studio. In this Preview, we’ve focused on a few key areas, such as making it faster to open and work with projects stored in git repositories, improving IntelliSense with Artificial Intelligence (AI) (a feature we call Visual Studio IntelliCode), and making it easier to collaborate with your teammates by integrating Live Share. With each preview, we’ll be adding capabilities, improving performance, and refining the user experience, and we absolutely want your feedback.

For a quick overview of the new functionality, you can keep reading this blog, or if you want a video overview, check out our team member Allison’s introduction to Visual Studio 2019. But before you do either, make sure to kick off the download.

Enabling you to focus on your work

Right off the bat, you’ll notice that Visual Studio 2019 opens with a new start window on launch. This experience is better designed to work with today’s Git repositories – whether local repos or online Git repos on GitHub, Azure Repos, or elsewhere. Of course, you can still open an existing project or solution or create a new one. (This experience is also coming soon to Visual Studio 2019 for Mac.) We’ll have a more detailed blog post on the new start window experience next week, which will also go into some of the research that supported this revamp.

Visual Studio 2019 start window

Visual Studio 2019 for Mac start window

Once you’re in the IDE, you’ll notice a few changes to the UI and UX of Visual Studio 2019. Jamie Young recently published a blog post with more detail on these changes, but to recap, they include a new product icon, a refreshed blue theme with small changes across the UI to create a cleaner interface, and a more compact title and menu bar – for which we’ve heard your feedback loud and clear and are working to further optimize.

In addition to the enhancements Jamie mentions, today we’re sharing the new search experience in Visual Studio 2019, which replaces the existing “Quick Launch” box. You can now search for settings, commands, and install options. The new search experience is also smarter, as it supports fuzzy string searching to help find what you are looking for even when misspelled.

The new search experience in Visual Studio 2019

When you’re coding, Visual Studio 2019 makes it easier to get your work done quickly.  We’ve started by focusing on code maintainability and consistency experiences in this preview. We’ve added new refactoring capabilities – such as changing for-loops to LINQ queries and converting tuples to named-structs – to make it even easier to keep your code in good shape. With the new document health indicator and code clean-up functionality, you can now easily identify and fix warnings and suggestions with the click of a button.

The document health indicator and code clean-up command

Common debugging task are also easier. You’ll immediately see that stepping performance is improved, allowing for a much smoother debugging experience. We’ve also added search capabilities to the Autos, Locals, and Watch windows helping you track down objects and values. Watch for a future blog post that goes deeper into the debugger improvements in Visual Studio 2019, including the new Time Travel Debugging for managed code feature (coming to a future Preview), updates to the Snapshot Debugger to target Azure Kubernetes Service (AKS) and Virtual Machine Scale Sets (VMSS), and better performance when debugging large C++ projects; thanks to an out-of-process 64-bit debugger.

Search in the Watch window

Helping your team work together

Building on the work we started in Visual Studio 2017, we’re improving Visual Studio IntelliCode, our context-aware and AI-powered IntelliSense, to enable training it on your own code repositories and share the results with your team. IntelliCode reduces the number of keystrokes you need since the completion lists are prioritized on the most common coding patterns for that API combined with the context of the code in your existing project. We’ll have a blog post on all the improvements in IntelliCode coming later this week, including more details on learning from your code, and C++ and XAML support being added for Visual Studio 2019.

Visual Studio IntelliCode using a trained model

Earlier this year, we introduced Visual Studio Live Share to help you collaborate in real-time with anyone across the globe using Visual Studio or Visual Studio Code. Live Share is installed by default with Visual Studio 2019, so you can immediately invite your teammates to join your coding session to take care of a bug or help make a quick change. You’ll also find it’s easier to start a session and view who you’re working within a dedicated space at the top-right of the user interface. We’ll also have a deeper-dive post on Visual Studio Live Share improvements in the next few days, including support for any project, app type, and language, Solution View for guests, and support for more collaboration scenarios.

Visual Studio Live Share integrated in Visual Studio 2019

Last, we’re introducing a brand-new pull request (PR) experience in Visual Studio 2019, which enables you to review, run, and even debug pull requests from your team without leaving the IDE. We support code in Azure Repos today but are going to expand to support GitHub and improve the overall experience. To get started, you can download the Pull Requests for Visual Studio extension from the Visual Studio Marketplace.

The new pull request experience in Visual Studio 2019

.NET Core 3 Preview 1

We also announced .NET Core 3 Preview 1 today, and Visual Studio 2019 will be the release to support building .NET Core 3 applications for any platform. Of course, we also continue to support and improve cross-platform C++ development, as well as .NET mobile development for iOS and Android with Xamarin.

.NET Core 3.0 development in Visual Studio 2019

Help us build the best Visual Studio yet

We are very thankful to have such an active community and can’t wait to hear what you think about Visual Studio 2019. Please help us make this the best Visual Studio yet by letting us know of any issues you run into by using the Report a Problem tool in Visual Studio. You can also head over to the Visual Studio Developer Community to track your issue or, even better, suggest a feature, ask questions, and find answers from others.

We will share more about the full feature set and SKU lineup of Visual Studio 2019 in the coming months as we release more previews. You can try Visual Studio 2019 side-by-side with your current installation of Visual Studio 2017, or if you want to give it a spin without installing it, check out the Visual Studio images on Azure.

I also want to take a moment to thank our vibrant extension ecosystem, who have made over 400 extensions available for Visual Studio 2019 Preview 1 already, and more are being added each day. You can find these extensions on the Visual Studio Marketplace.

Microsoft has always been a company with developers at the heart – we’re humbled that the community of users of the Visual Studio family has surpassed 12 million. We aim to make every second you spend coding more productive and delightful. Please continue to share your feedback on the preview for Visual Studio 2019 to help guide the future direction of the product so it becomes your favorite tool. Thank you!

John Montgomery, Director of Program Management for Visual Studio
@JohnMontJohn is responsible for product design and customer success for all of Visual Studio, C++, C#, VB, JavaScript, and .NET. John has been at Microsoft for 17 years, working in developer technologies the whole time.

Qubits in Q#

December 1st, 2018 No comments

How should qubits be represented in a quantum programming language?

In the quantum circuit model, a quantum computation is represented as a sequence of operations, sometimes known as gates, applied to a set of qubits. This leads to pictures such as:

Teleportation quantum circuit

from Quantum Computation and Quantum Information by Nielsen and Chuang

In this picture, each horizontal line is a qubit, each box is an operation, and time flows from left to right.

When we want to design a programming language to express a quantum computation, the question naturally arises of whether qubits should be represented in the language, and if so, how. In the most naive model of such a picture, there would be a software entity that represented each horizontal line, with little or no accessible state other than perhaps a label, but there are other possibilities.

Quantum States as Linear Types

Quipper uses linear types to model quantum states, although it refers to the data type as Qubit. The intuition is that the no-cloning theorem prevents you from making a copy of the quantum state of a qubit, so it makes sense to use the type system to prevent you from making a copy of the software representation of quantum state. Linear types have proven useful in other contexts where copying the software representation of an entity would be bad, for instance in functional concurrent programming, so why not for quantum computing?

The argument for linear types is, as mentioned, that they reflect the no-cloning theorem in the language. The implication is that a software qubit represents a qubit state, rather than an actual object. The problem with this view is that, once entangled, it no longer makes sense to talk about the state of an individual qubit; that’s more or less exactly what being entangled means. To model this in software, an entangling gate such as a CNOT should take two single-qubit states as inputs and return a software entity that represents two-qubit state as output — as long as you never want to perform a CNOT on two qubits that are each entangled with other qubits.

The software entity as quantum state abstraction breaks down for two reasons:

  • because quantum computing works by applying operations to physical entities, not to quantum states, so the abstraction doesn’t correspond to operational reality; and
  • because in general there is no actual physical quantum state smaller than the state of the entire quantum computer, so the abstraction doesn’t correspond to physical reality.

Qubits as Opaque References

An alternate approach is to use an opaque data type that represents a reference to a specific two-state quantum system, whether physical or logical (error-corrected), on which operations such as `H` or `X` may be performed. This is an operational view of qubits: qubits are defined by what you can do to them. Both OpenQASM and Q# follow this model.

Quantum Computing is Computing by Side Effect

The representation used in Q# has the interesting implication that all of the actual quantum computing is done by side effect. There is no way to directly interact with the quantum state of the computer; it has no software representation at all. Instead, one performs operations on qubit entities that have the side effect of modifying the quantum state. Effectively, the quantum state of the computer is an opaque global variable that is inaccessible except through a small set of accessor primitives (measurements) — and even these accessors have side effects on the quantum state, and so are really “mutators with results” rather than true accessors.

In general programming, the use of side effects and global state is generally discouraged. For quantum computing, on the other hand, they seem to match the actual physical reality pretty well. For this reason, we decided that this abstraction was the right one to use in Q#.

This post is the first one in the Q# Advent Calendar 2018. Follow the calendar for other great posts!

Alan Geller, Software Architect, Quantum Software and Applications
@ageller

Alan Geller is a software architect in the Quantum Architectures and Computation group at Microsoft. He is responsible for the overall software architecture for Q# and the Microsoft Quantum Development Kit, as well as other aspects of the Microsoft Quantum software program.

Categories: Q#, Quantum, Visual Studio Tags:

Git now fully supported and integrated into Team Foundation Service

January 30th, 2013 No comments

Here is great news for open source developers: Brian Harry announced today at the Microsoft’s ALM Summit that Git is now fully integrated into Visual Studio as well as the Team Foundation Service, Microsoft’s cloud-powered Application Lifecycle Management tool.

Here at Microsoft Open Technologies, Inc., we are excited to hear such news as this offers more choice and flexibility to development teams. We happen to work on a daily basis with developers on Git in the context of projects such as Node, Dash, Redis or Solr so we totally get the goodness of this news.

The Visual Studio Tools for Git work great against Git repositories locally, in Team Foundation Service, on GitHub, CodePlex, BitBucket etc. That’s all because they are using Git as the distributed source control solution and they talk to Git repositories via the open source library LibGit2. LibGit2 is a portable C library that runs on many different platforms including Linux and Mac.

Microsoft engineers in Brian’s team have been contributing to LibGit2 for a number of months now as they worked with the community to add Git support in Visual Studio – some of them earning committer rights on this popular and very active open source project. Even better as the team started testing the integration, all the bug fixes and security fixes that they found also have been contributed back to the project.

Therefore not only is Brian’s announcement good news for developers in Visual Studio wanting to use Git to contribute to open source projects, it’s also great news for others building on top of the LibGit2 library on any platform.

The Visual Studio Tools for Git are provided as an extension for Visual Studio 2012 but Brian also says that they should be included in the box with all editions of Visual Studio in a future release – including the Express editions.

I can tell you MS Open Tech engineers can’t wait to take full advantage of the Visual Studio Tools for Git in their daily interaction and collaboration with the open source developers’ community.

Categories: Git, Open Source, Visual Studio Tags:

Get security updates for September

September 11th, 2012 No comments

Microsoft releases security updates on the second Tuesday of every month. 

The bulletin announces the release of 2 security updates:

  • 1 update for Visual Studio
  • 1 update for System Center 

Get the updates.

Watch a video about the updates.

To get more information about security updates and other privacy and security issues delivered to your email inbox, sign up for our newsletter.

Security updates for August

August 9th, 2011 No comments

Microsoft releases security updates on the second Tuesday of every month. Today Microsoft released 13 security updates.

  • 8 updates for Microsoft Windows
  • 2 updates for .NET Framework
  • 1 update for Windows Visio
  • 1 update for Microsoft Internet Explorer
  • 1 update for Visual Studio

Get the updates.

Watch a video about the updates.

To get more information about security updates and other privacy and security issues delivered to your email inbox, sign up for our newsletter.

Silverlight 3.0 Datagrid – How to change a cell state?

February 13th, 2010 No comments

Hi Syam Pinnaka, Sr. SDE in Infosec tools team.

Silverlight 3.0 datagrid can be used to bind to any enumerable collection and display the data in the grid. The data changes in the grid can be propagated back to the bound data using a special type in silverlight called ObservableCollection. We will discuss more about ObservableCollection in a separate post. In this post Lets see how to change a datagrid cell state based on certain condition. For example lets say there are two DataGridCheckBoxColumn columns and first check box column state will need to change to read-only based on the value of second check box column.

We can accomplish this by handling datagrid events like BeginningEdit or CellEditEnded. In our example, we can use BeginningEdit to check for checkbox whether the checkbox being clicked is first one, if so check the state of second check box to allow the click or not. Example code below.

#region selectUsersGrid_BeginningEdit
private void selectUsersGrid_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
{
    if (e.Column.DisplayIndex == 0) //First DataGridCheckBoxColumn
    {
        User u = e.Row.DataContext as User; //fetch the row data.
        if (u.IsMember == false) //examine the second checkbox data, do not allow if its false
        {
            e.Cancel = true;
        }
    }
}
#endregion

The same effect can be accomplished in some other ways. For example we can use CellEditEnded instead of BeginningEdit. In CellEditEnded, check for second check box state and mark first one as read-only when required. Example code below.

#region selectUsersGrid_CellEditEnded
private void selectUsersGrid_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
{
    if (e.Column.DisplayIndex == 1) //Second check box state changed.
    {
        User u = e.Row.DataContext as User; //fetch the row data
        if (u.IsMember == false) //This is not a member, Clear IsDeny (make first check box as read-only)
            u.IsDeny = false;
    }
}
#endregion

One point to note in the above two code snippets is that, we are modifying the data (binding) to alter the cell state instead of cell itself. This becomes essential when we waned to change state that is not related to data, for example lets say background color of the cell. this can be accomplished as below.

 

#region selectUsersGrid_CellEditEnded
private void selectUsersGrid_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
{
    if (e.Column.DisplayIndex == 1) //Second check box state changed.
    {

FrameworkElement firstCheckbox = e.Column.GetCellContent(e.Row);
if (firstCheckbox is CheckBox)
{
    CheckBox c = firstCheckbox as CheckBox;
    c.Background = new SolidColorBrush(Colors.Red);
}

    }
}
#endregion

 

This is about it for now, We will talk more silverlight during coming posts. Feel free to contact me at syamp@microsoft.com if you have any questions about the above post.

Happy coding!

Categories: ASP.NET, C#, SilverLight, Visual Studio Tags:

Silverlight 3.0 Datagrid – How to change a cell state?

February 13th, 2010 Comments off

Hi Syam Pinnaka, Sr. SDE in Infosec tools team.

Silverlight 3.0 datagrid can be used to bind to any enumerable collection and display the data in the grid. The data changes in the grid can be propagated back to the bound data using a special type in silverlight called ObservableCollection. We will discuss more about ObservableCollection in a separate post. In this post Lets see how to change a datagrid cell state based on certain condition. For example lets say there are two DataGridCheckBoxColumn columns and first check box column state will need to change to read-only based on the value of second check box column.

We can accomplish this by handling datagrid events like BeginningEdit or CellEditEnded. In our example, we can use BeginningEdit to check for checkbox whether the checkbox being clicked is first one, if so check the state of second check box to allow the click or not. Example code below.

#region selectUsersGrid_BeginningEdit
private void selectUsersGrid_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
{
    if (e.Column.DisplayIndex == 0) //First DataGridCheckBoxColumn
    {
        User u = e.Row.DataContext as User; //fetch the row data.
        if (u.IsMember == false) //examine the second checkbox data, do not allow if its false
        {
            e.Cancel = true;
        }
    }
}
#endregion

The same effect can be accomplished in some other ways. For example we can use CellEditEnded instead of BeginningEdit. In CellEditEnded, check for second check box state and mark first one as read-only when required. Example code below.

#region selectUsersGrid_CellEditEnded
private void selectUsersGrid_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
{
    if (e.Column.DisplayIndex == 1) //Second check box state changed.
    {
        User u = e.Row.DataContext as User; //fetch the row data
        if (u.IsMember == false) //This is not a member, Clear IsDeny (make first check box as read-only)
            u.IsDeny = false;
    }
}
#endregion

One point to note in the above two code snippets is that, we are modifying the data (binding) to alter the cell state instead of cell itself. This becomes essential when we waned to change state that is not related to data, for example lets say background color of the cell. this can be accomplished as below.

 

#region selectUsersGrid_CellEditEnded
private void selectUsersGrid_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
{
    if (e.Column.DisplayIndex == 1) //Second check box state changed.
    {

FrameworkElement firstCheckbox = e.Column.GetCellContent(e.Row);
if (firstCheckbox is CheckBox)
{
    CheckBox c = firstCheckbox as CheckBox;
    c.Background = new SolidColorBrush(Colors.Red);
}

    }
}
#endregion

 

This is about it for now, We will talk more silverlight during coming posts. Feel free to contact me at syamp@microsoft.com if you have any questions about the above post.

Happy coding!

Categories: ASP.NET, C#, SilverLight, Visual Studio Tags:

Silverlight 3.0 Datagrid – How to change a cell state?

February 13th, 2010 No comments

Hi Syam Pinnaka, Sr. SDE in Infosec tools team.

Silverlight 3.0 datagrid can be used to bind to any enumerable collection and display the data in the grid. The data changes in the grid can be propagated back to the bound data using a special type in silverlight called ObservableCollection. We will discuss more about ObservableCollection in a separate post. In this post Lets see how to change a datagrid cell state based on certain condition. For example lets say there are two DataGridCheckBoxColumn columns and first check box column state will need to change to read-only based on the value of second check box column.

We can accomplish this by handling datagrid events like BeginningEdit or CellEditEnded. In our example, we can use BeginningEdit to check for checkbox whether the checkbox being clicked is first one, if so check the state of second check box to allow the click or not. Example code below.

#region selectUsersGrid_BeginningEdit
private void selectUsersGrid_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
{
    if (e.Column.DisplayIndex == 0) //First DataGridCheckBoxColumn
    {
        User u = e.Row.DataContext as User; //fetch the row data.
        if (u.IsMember == false) //examine the second checkbox data, do not allow if its false
        {
            e.Cancel = true;
        }
    }
}
#endregion

The same effect can be accomplished in some other ways. For example we can use CellEditEnded instead of BeginningEdit. In CellEditEnded, check for second check box state and mark first one as read-only when required. Example code below.

#region selectUsersGrid_CellEditEnded
private void selectUsersGrid_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
{
    if (e.Column.DisplayIndex == 1) //Second check box state changed.
    {
        User u = e.Row.DataContext as User; //fetch the row data
        if (u.IsMember == false) //This is not a member, Clear IsDeny (make first check box as read-only)
            u.IsDeny = false;
    }
}
#endregion

One point to note in the above two code snippets is that, we are modifying the data (binding) to alter the cell state instead of cell itself. This becomes essential when we waned to change state that is not related to data, for example lets say background color of the cell. this can be accomplished as below.

 

#region selectUsersGrid_CellEditEnded
private void selectUsersGrid_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
{
    if (e.Column.DisplayIndex == 1) //Second check box state changed.
    {

FrameworkElement firstCheckbox = e.Column.GetCellContent(e.Row);
if (firstCheckbox is CheckBox)
{
    CheckBox c = firstCheckbox as CheckBox;
    c.Background = new SolidColorBrush(Colors.Red);
}

    }
}
#endregion

 

This is about it for now, We will talk more silverlight during coming posts. Feel free to contact me at syamp@microsoft.com if you have any questions about the above post.

Happy coding!

Categories: ASP.NET, C#, SilverLight, Visual Studio Tags:

How To: Use CAT.NET 2.0 Beta

February 5th, 2010 No comments

Syed Aslam Basha here. I am a tester on the Information Security Tools Team responsible for testing CAT.NET.

You can download the current Beta of CAT.NET 2.0 from https://connect.microsoft.com/site734/Downloads/DownloadDetails.aspx?DownloadID=26086&wa=wsignin1.0

* You must have Visual studio 2010 Beta 2 for this tool to work. There are known issues if you have previous issues installed so please be aware.*

After the installation open up Visual Studio 2010 command prompt in *Administrator* mode by going to Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt. At the command prompt type “sn -Vr *,b03f5f7f11d50a3a” to skip strong name verification for fxcop assemblies.

*Note sn this step will be fixed in a an incremental build very soon*

image_thumb

 

You can run CAT.NET as FXcop rules from FXCop GUI or FXCopcmd.exe

1. Start FxCop by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop. This will bring up the UI with CAT.NET rules loaded.

 

image_thumb1

2. Right click “My FxCop Project” and select “Add Targets” to browse and add a target to analyze.

image_thumb2

3. Click on the “Rules” tab to select appropriate rules.

image_thumb3

 
Note: Sometimes FxCop UI does not display any results after selecting both rules. Workaround is to select configuration rules or data flow rules and alternate the selection after analysis.

4. After selecting a target, click the “Analyze” button in toolbar or just press F5 to start the analysis.

5. Review the results in the window on the right.

6. You can also run the analysis using the FxCop command line tool. Open FxCop Command line tool by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop Command Prompt. This will run the command line tool and display all the existing command line switches.

7. You can start analysis by using /console and /file switches. /console switch displays error in the console and /file switch specifies which file to analyze. Ex: FxCopCmd.exe /console /file:"C:AntiXssSample ApplicationbinSampleApp.dll"

image_thumb4

 

-Syed Aslam Basha (syedab@microsoft.com)

Microsoft Information Security Tools (IST) Team

Test Lead

How To: Use CAT.NET 2.0 Beta

February 5th, 2010 Comments off

Syed Aslam Basha here. I am a tester on the Information Security Tools Team responsible for testing CAT.NET.

You can download the current Beta of CAT.NET 2.0 from https://connect.microsoft.com/site734/Downloads/DownloadDetails.aspx?DownloadID=26086&wa=wsignin1.0

* You must have Visual studio 2010 Beta 2 for this tool to work. There are known issues if you have previous issues installed so please be aware.*

After the installation open up Visual Studio 2010 command prompt in *Administrator* mode by going to Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt. At the command prompt type “sn -Vr *,b03f5f7f11d50a3a” to skip strong name verification for fxcop assemblies.

*Note sn this step will be fixed in a an incremental build very soon*

image_thumb

 

You can run CAT.NET as FXcop rules from FXCop GUI or FXCopcmd.exe

1. Start FxCop by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop. This will bring up the UI with CAT.NET rules loaded.

 

image_thumb1

2. Right click “My FxCop Project” and select “Add Targets” to browse and add a target to analyze.

image_thumb2

3. Click on the “Rules” tab to select appropriate rules.

image_thumb3

 
Note: Sometimes FxCop UI does not display any results after selecting both rules. Workaround is to select configuration rules or data flow rules and alternate the selection after analysis.

4. After selecting a target, click the “Analyze” button in toolbar or just press F5 to start the analysis.

5. Review the results in the window on the right.

6. You can also run the analysis using the FxCop command line tool. Open FxCop Command line tool by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop Command Prompt. This will run the command line tool and display all the existing command line switches.

7. You can start analysis by using /console and /file switches. /console switch displays error in the console and /file switch specifies which file to analyze. Ex: FxCopCmd.exe /console /file:"C:\AntiXss\Sample Application\bin\SampleApp.dll"

image_thumb4

 

-Syed Aslam Basha (syedab@microsoft.com)

Microsoft Information Security Tools (IST) Team

Test Lead

How To: Use CAT.NET 2.0 Beta

February 5th, 2010 No comments

Syed Aslam Basha here. I am a tester on the Information Security Tools Team responsible for testing CAT.NET.

You can download the current Beta of CAT.NET 2.0 from https://connect.microsoft.com/site734/Downloads/DownloadDetails.aspx?DownloadID=26086&wa=wsignin1.0

* You must have Visual studio 2010 Beta 2 for this tool to work. There are known issues if you have previous issues installed so please be aware.*

After the installation open up Visual Studio 2010 command prompt in *Administrator* mode by going to Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt. At the command prompt type “sn -Vr *,b03f5f7f11d50a3a” to skip strong name verification for fxcop assemblies.

*Note sn this step will be fixed in a an incremental build very soon*

image_thumb

 

You can run CAT.NET as FXcop rules from FXCop GUI or FXCopcmd.exe

1. Start FxCop by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop. This will bring up the UI with CAT.NET rules loaded.

 

image_thumb1

2. Right click “My FxCop Project” and select “Add Targets” to browse and add a target to analyze.

image_thumb2

3. Click on the “Rules” tab to select appropriate rules.

image_thumb3

 
Note: Sometimes FxCop UI does not display any results after selecting both rules. Workaround is to select configuration rules or data flow rules and alternate the selection after analysis.

4. After selecting a target, click the “Analyze” button in toolbar or just press F5 to start the analysis.

5. Review the results in the window on the right.

6. You can also run the analysis using the FxCop command line tool. Open FxCop Command line tool by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop Command Prompt. This will run the command line tool and display all the existing command line switches.

7. You can start analysis by using /console and /file switches. /console switch displays error in the console and /file switch specifies which file to analyze. Ex: FxCopCmd.exe /console /file:"C:\AntiXss\Sample Application\bin\SampleApp.dll"

image_thumb4

 

-Syed Aslam Basha (syedab@microsoft.com)

Microsoft Information Security Tools (IST) Team

Test Lead

How To: Use CAT.NET V2.0 Beta

February 5th, 2010 Comments off

Syed Aslam Basha here. I am a tester on the Information Security Tools Team responsible for testing CAT.NET.

You can download the current Beta of CAT.NET 2.0 from https://connect.microsoft.com/site734/Downloads/DownloadDetails.aspx?DownloadID=26086&wa=wsignin1.0

* You must have Visual studio 2010 Beta 2 for this tool to work. There are known issues if you have previous issues installed so please be aware.*

After the installation open up Visual Studio 2010 command prompt in *Administrator* mode by going to Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt. At the command prompt type “sn -Vr *,b03f5f7f11d50a3a” to skip strong name verification for fxcop assemblies.

image

You can run CAT.NET as FXcop rules from FXCop GUI or FXCopcmd.exe

1. Start FxCop by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop. This will bring up the UI with CAT.NET rules loaded.

image

2. Right click “My FxCop Project” and select “Add Targets” to browse and add a target to analyze.

image

3. Click on the “Rules” tab to select appropriate rules.

image
Note: Sometimes FxCop UI does not display any results after selecting both rules. Workaround is to select configuration rules or data flow rules and alternate the selection after analysis.

4. After selecting a target, click the “Analyze” button in toolbar or just press F5 to start the analysis.

5. Review the results in the window on the right.

6. You can also run the analysis using the FxCop command line tool. Open FxCop Command line tool by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop Command Prompt. This will run the command line tool and display all the existing command line switches.

7. You can start analysis by using /console and /file switches. /console switch displays error in the console and /file switch specifies which file to analyze. Ex: FxCopCmd.exe /console /file:"C:\AntiXss\Sample Application\bin\SampleApp.dll"

image

-Syed Aslam Basha (syedab@microsoft.com)

Microsoft Information Security Tools (IST) Team

Test Lead

How To: Use CAT.NET V2.0 Beta

February 5th, 2010 No comments

Syed Aslam Basha here. I am a tester on the Information Security Tools Team responsible for testing CAT.NET.

You can download the current Beta of CAT.NET 2.0 from https://connect.microsoft.com/site734/Downloads/DownloadDetails.aspx?DownloadID=26086&wa=wsignin1.0

* You must have Visual studio 2010 Beta 2 for this tool to work. There are known issues if you have previous issues installed so please be aware.*

After the installation open up Visual Studio 2010 command prompt in *Administrator* mode by going to Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt. At the command prompt type “sn -Vr *,b03f5f7f11d50a3a” to skip strong name verification for fxcop assemblies.

image

You can run CAT.NET as FXcop rules from FXCop GUI or FXCopcmd.exe

1. Start FxCop by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop. This will bring up the UI with CAT.NET rules loaded.

image

2. Right click “My FxCop Project” and select “Add Targets” to browse and add a target to analyze.

image

3. Click on the “Rules” tab to select appropriate rules.

image
Note: Sometimes FxCop UI does not display any results after selecting both rules. Workaround is to select configuration rules or data flow rules and alternate the selection after analysis.

4. After selecting a target, click the “Analyze” button in toolbar or just press F5 to start the analysis.

5. Review the results in the window on the right.

6. You can also run the analysis using the FxCop command line tool. Open FxCop Command line tool by going to Start -> All Programs -> Microsoft Information Security -> Code Analysis Tool for .NET (CAT.NET) v2.0 -> FxCop Command Prompt. This will run the command line tool and display all the existing command line switches.

7. You can start analysis by using /console and /file switches. /console switch displays error in the console and /file switch specifies which file to analyze. Ex: FxCopCmd.exe /console /file:"C:\AntiXss\Sample Application\bin\SampleApp.dll"

image

-Syed Aslam Basha (syedab@microsoft.com)

Microsoft Information Security Tools (IST) Team

Test Lead