Making a Visual Studio Extension with .Net Core - visual-studio-extensions

By default, Visual Studio 2022 Extension (Add-in) Project is on .Net Framework (not .Net 5 or 6). When I manually .csproj > PropertyGroup > TargetFramework XML value to net5.0, I run into a compile error.
Some of my projects are made with .Net 5 and it cannot be built with multiple targets (i.e. both .Net 5 and .Net Framework), which are needed to be referenced by my Visual Studio Extension project. Unfortunately, a .Net Framework project cannot reference a .Net 5 project, on the other hand, the vice versa can be partially available.
Is there any way of making Visual Studio Extensions with .Net 5 or later? If it cannot be done, how can I have my Visual Studio Extension project reference a .Net 5 based libraries(.dll)?

Visual Studio itself is currently a .NET 4.8 application, so you can't use .NET 5 stuff in it anywhere.

Visual Studio is adding support for out-of-process extensions, meaning that they run in a separate process from Visual Studio's main devenv.exe process, which runs on .NET Framework 4.x. That means the extension can be written using other technologies, such as .NET 6.
Blog post: https://devblogs.microsoft.com/visualstudio/the-future-of-visual-studio-extensibility-is-here/
Write your first extension: https://github.com/microsoft/VSExtensibility/blob/main/docs/new-extensibility-model/getting-started/create-your-first-extension.md
Out-of-proc extensibility: https://github.com/microsoft/VSExtensibility/blob/main/docs/new-extensibility-model/getting-started/oop-extensibility-model-overview.md
Out-of-proc UI: https://github.com/microsoft/VSExtensibility/blob/main/docs/new-extensibility-model/inside-the-sdk/remote-ui.md

Related

Visual Studio 2022 - Visual Basic ASP.NET Web Application

I 've downloaded/installed Visual Studio 2022 Community Edition but there is no way to find the ability to create a new ASP.NET Web Application (.Net Framework) using Visual Basic. It looks like i can only develop Windows Desktop Application using it.
Has it been deprecated ? If not how can i bring it back to life?
Run the Visual Studio installer.
Inside the .NET group, below the ".NET Framework 4.8 targeting pack", there is a component named .NET Framework project and item templates and make sure that you have installed it.
Visual Studio 2022 Installer - individual components .in NET group
Hovering over the component, the tooltip describes it as:
Enables .NET Framework project templates, item templates & related
features for .NET Framework development.
See: https://www.howtosolutions.net/2021/11/visual-studio-missing-asp-net-web-application-template-dotnet-framework/

How to migrate websites from .NET 2 to .NET 4 using Visual Studio?

Hi I would like to know the correct steps and procedure required to convert existing .NET 2 websites to .NET4 using Visual Studio. Please let me know if there is any online resources (blog,tutorial,video,official doc) available that teaching you. Cheers. :)
If you use Visual Studio to open a Web project that was developed for the .NET Framework 2.0, the .NET Framework 3.0, or the .NET Framework 3.5, Visual Studio can automatically perform all the changes to Web.config files that are required to be able to run using .NET Framework version 4.
If the project is a local IIS project and you are using IIS 7.0, Visual Studio can also reassign the application to an application pool that is associated with the .NET Framework version 4.
For step by step instructions, see link http://msdn.microsoft.com/en-us/library/vstudio/dd483478(v=vs.100).aspx

Is it possible to force Visual Studio 2010 to use Visual Basic 10?

To reproduce the error I'm getting:
Create a new Visual Studio 2010 ASP.NET web site in Visual Basic, targeting .NET 2.0
Type "Public Property Test As String"
Observe "Visual Basic 9.0 does not support auto-implemented properties." error
Visual Studio 2010 is happy to use VB 10 against .NET 2.0-targeted Windows Forms applications, this only appears to be an issue with ASP.NET.
Is there a way to force Visual Studio 2010 to use VB 10 when targeting .NET 2.0?
No. A Web Site project is one that compiles within ASP.NET at runtime - as such, you've chosen to ask ASP.NET to run it as a .NET 2.0 project, so it will use the .NET 2.0 vbc Visual Basic compiler that's part of .NET. That compiler has no knowledge of VB 10, and so you're rightly being warned that it will not work.
The reason it can work for other project types is because the compilation is happening using a later compiler (usually the one built into Visual Studio).

Targeting .NET3.5 with ASP.NET MVC2 Web Application in Visual Studio 2010?

Our current environment is .NET 3.5 SP1 but we're in the process of migrating to .NET4 and Visual Studio 2010.
I would like to stick to using .NET 3.5 for the deployment/production environment however use Visual Studio and TFS 2010 for development, until the production environment is cleared for upgrade to .NET4. Is this possible (I assume yes :B), and how?
What I have tried is changing the TargetFrameworkVersion in the project settings to "v3.5". However, I get a build failure due to the classes in System.Web.Security that moved to System.Web.ApplicationServices in .NET 4 (e.g. MembershipUser) not being found... so it appears that it is using .NET4 libraries and not .NET3.5? Do I add the System.Web.ApplicationServices library to my project, and if so, does this mean it will still run on .NET 3.5?
Also, I noticed that the ToolsVersion of the project is 4.0, would changing it from 4.0 to 3.5 be the correct thing to do? When I do this, re-opening the project causes Visual Studio to run the conversion process, changing the ToolsVersion back to 4.0 ...
Cheers,
James
You must have Visual Studio 2008 installed to be able to target .NET 3.5 in Visual Studio 2010.

MSBee and its use

What exactly is MSBee? How should I use it in addition to MSBuild to build web applications which are created in Visual Studio .NET 2003 and that target .NET Framework 1.1?
MSBuild Extras – Toolkit for .NET 1.1
“MSBee” is an addition to MSBuild that
allows developers to build managed
applications using Visual Studio 2005
projects that target .NET 1.1.
Take a look at the codeplex page:
http://www.codeplex.com/wikipage?ProjectName=MSBee
Also, look into upgrading the version of .NET/VS you are using. You're due...

Resources