PostSharp 3 is available only as a visual studio extension. Visual Studio Express don't support extension. Is there a way to use PostSharp 3 with Express version of Visual Studio?
Previously we use PostSharp 2.1 as an external tools with free PostSharp express license, but currently this license is not available.
Here is an answer from PostSharp tech support:
PostSharp 2.1 Starter editions are not available any more. However, PostSharp 3 does not work in VS Express.
Now it is possible, using Nuget package. Actually, you should add reference to Postsharp Nuget to all projects that are failed for compile.
In my case, I have a postsharp reference in some referenced project and Console app project and WebApplication projects required to have reference to package too.
To provide license just go to package folder and run Postsharp.HQ.v.3.0.exe
Related
According to https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files
.NET full framework projects support PackageReference
In which versions of Visual Studio is that?
With Visual Studio 2017 and .NET Core, we have improved the
NuGet package management experience by introducing the
PackageReference feature in MSBuild. PackageReference brings new and improved capabilities such as deep MSBuild integration, improved
performance for everyday tasks such as install and restore,
multi-targeting and more.
Starting with the first Update (15.1) you get support for other types.
What about other project types that are not .NET Core? You can get a first look of what will come in the next NuGet update. Hop on to
the Visual Studio 2017 Update 1 Preview 2 bandwagon.
So if you run the current 15.7.x you already have support even if Visual Studio 2017 still uses packages.config by default. With 15.7 VS2017 does also have a convert tool to migrate the old packages.config way to new style:
I have a mixed environment where some developers are working on Visual Studio 2013, and others are working on 2015. Everything worked fine until we updated a referenced NuGet package from Visual Studio 2015.
Now, when trying to restore the NuGet packages from Visual Studio 2013, I see the following error:
NuGet Package restore failed for project Foo: The 'System.Linq 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60723.765'..
Apparently, there is no NuGet version 3.x for Visual Studio 2013.
Is there a solution to continue working with both Visual Studio 2013 and 2015?
Sigh, a team that can't make up their mind about what tools they use, what could possibly go wrong? Well this. And the other rather nasty problem, that package is meant for projects that target CoreCLR and the Win10 flavor of Universal apps. You cannot create nor build such a project on VS2013. So trying to solve the Nuget version problem doesn't buy you anything.
You guys need to get together and hammer-out what projects you are going to work on. If CoreCLR is what everybody wants to do, and do ask why, then everybody must update to VS2015.
As Hans Passant noted in his reply, there is no need for NuGet 3.0 on projects which are only targetting the vanilla .NET 4.5 framework (and that's what Visual Studio 2013 was meant to target in our case).
It was the addition of an updated NuGet package, specifically System.Collections.Immutable 1.1.37, which introduced a dependency on .NETPlatform,Version=v5.0, which in turn triggered the accidental dependency on NuGet 3.0.
Returning to version 1.1.36 of that package solved the issue.
Can we use MSBuild without Visual Studio 2012?
Currently, we have a build server where we are compiling and creating deployment copy of one of our projects, it has Visual Studio Professional Edition installed. We are setting up a new build server now. Do we really need Visual Studio 2012 on the new build server?
If yes, then how? I googled it but I couldn't find an answer.
We have spent a lot of time trying to get our Build Servers to work without Visual Studio.
We do not use TFS for builds and therefore I am not sure the license exemption above applies to us. Also not having Visual Studio installed helps you really understand how your software is building and get references correct.
We have seen many examples of solutions with projects that contains references for the same piece of software with some in nuget packages shipped with the solution and others that are pointing to locations in the "program files" path which are not present on machines without Visual Studio installed. Once you attempt to build software without VS installed you can really see how "self-contained" your applications are.
Before I start listing the things you typically need to install, let me just point out that MS Build is now no longer considered part of the .NET framework but is shipped with Visual Studio but can also be installed separately. See this blog post for more: http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx
The following software needs to be installed for most builds, there may be others for example if you are creating portable class libraries.
Microsoft Build Tools 2013
Web Deploy 3.5 (for packaging applications)
Microsoft .NET Framework 4.5.1 Developer Pack
Microsoft .NET Framework 4.5.2 Developer Pack
Windows Software Development Kit (SDK) for Windows 8 (You can use the SDK to build applications that target these operating systems: Windows 8, Windows 7, Windows Vista, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008)
The following directories need to be copied:
Reference Assemblies (need to be copied from a machine running Visual Studio from/to directory C:\Program Files (x86)\Reference Assemblies)
Public Assemblies (need to be copied from a machine running Visual Studio from/to directory C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies
We also use Wix and therefore we install the following:
WIX Toolset 3.8
I have a similar set for testing however that was not part of the question so I will leave that off!
Hope this helps someone.
Update: 3rd March 2017
Microsoft recently responded to a long standing user voice request "Support .NET Builds without requiring Visual Studio on the server" for the requirement for Visual Studio to be installed on a build server to be removed.
From the description on the download page "These Build Tools allow you to build native and managed MSBuild-based applications without requiring the Visual Studio IDE." Not tested yet but after RTM I will look at this and provide a further update here.
There is a blog post that promises these build tools install all pre-requisites and can be used to build MS Build based applications.
No, you don't need Visual Studio on your build box. If I recall correctly, msbuild is installed as part of the .NET framework - it certainly used to be.
Depending on what you're building, you may find that there are some things which are easier to get working if you do install Visual Studio though - things like portable class library profiles. While there are usually non-VS installers available, I've found it simpler to install an Express edition of Visual Studio just to get the bundled build targets.
Remember: The easiest way to build your visual studio solutions is to install Visual Studio on the build server. Even Visual Studio Express is often enough.
That said, you can make it work without it. But it it sometimes a lot of work to figure out. You'll need to install the right Windows / .NET Platform SDK. You can install multiple of these SDKs side by side. Now, when you depend, for example, on ASP.NET MVC 5 or Entity Framework 6, you might need to install further SDKs to get your application to compile. The downloads for these all assume that you also have Visual Studio installed, but many of their payloads can also be installed separately. It can become quite a hassle.
Personally I've grown tired of trying to figure out which parts of which installers enable what. But that is also driven by the fact that Microsoft allows you to install Visual Studio on a build server (TFS) with the same license as your development machine as long as you are an MSDN subscriber. Check the Visual Studio License Whitepaper for more details.
Using Visual Studio on the Build Server
If you have one or more licensed users of Visual Studio Ultimate with MSDN, Visual Studio Premium with MSDN, or Visual
Studio Professional with MSDN, then you may also install the Visual Studio software as part of Team Foundation Server
2013 Build Services. This way, you do not need to purchase a Visual Studio license to cover the running of Visual Studio on
the build server for each person whose actions initiate a build.
If you, like me, would prefer this to change in the future, I suggest you make sure you're heard by submitting your request or voting for an existing one over at the Visual Studio User Voice.
Here's just a quick take on this.
Your build machine should decouple development tools as much as is possible. With that said, and as already stated by others here, MSBuild can be run independently of Visual Studio, and it should!
If your build requires Visual Studio to run then there is a very good chance that you have a solution or project architecture problem that ought to be resolved.
Visual Studio doesn't need to be installed. MSBuild is part of the .net SDK.
Other .net dependencies will need to be installed though, if you are using them. MSTest, or anything that is part of Team foundation will require Visual Studio installed.
I believe you only need MSBuild ( that is part of the .NET framework you're targeting ) .
Make sure you install the proper .NET distribution
the following is a good place for build servers it have the developer tooling.
The .NET Framework 4.5.1 Developer Pack installs the multi-targeting pack for .NET Framework 4.5.1. Developers can build applications targeting the .NET Framework 4.5.1 using either Visual Studio 2012 or third party IDEs. You need to download the web installer instead of this package if you intend to redistribute .NET Framework 4.5.1.
http://www.microsoft.com/en-us/download/details.aspx?id=40772
Best of luck.
C++ :
There is a "Build Tools" that contains MSBuild, Visual studio is not required.
From the official doc :
These tools allow you to build C++ libraries and applications
targeting Windows desktop. They are the same tools that you find in
Visual Studio 2015 in a scriptable standalone installer. Now you only
need to download the tools you need to build C++ projects.
Managed :
The same applied : Build Tool Managed
I have custom check-in policies deploying via VSIX. Now I'm trying to use them in Visual Studio 2013.
What I did:
I opened my policies in VS 2013. Changed "Install Targets" in vsixmanifest to [10.0, 13.0).
Then built project, installed VSIX and opened both VS.
VSIX project uses .NET Framework 4.5, policies project uses 4.0.
What I have:
Last version of my policies in C:\Users\...\AppData\Local\Microsoft\VisualStudio\12.0Exp\Extensions directory
Copies of policies for both 2012 and 2013 VS in C:\Users\...\AppData\Local\Microsoft\VisualStudio\11.0(and 12.0)\Extensions
Key with path to policies in registry for both VS in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config(and 12.0_Config)\TeamFoundation\SourceControl\Checkin Policies
Now, when I want to apply them in Team Project Settings -> Source Control -> Check-in Policy -> Add, I can choose my custom policies in VS 2012, but VS 2013 just doesn't see them.
What can I do to fix it?
UPD:
So, I solved my problem by changing assembly version of Microsoft.TeamFoundation.VersionControl.Client from 11.0 to 12.0
AND
.NET Framework version in policies project from 4.0 to 4.5
As the Original Poster has posted, the version of .NET and of the referenced Client Object Model:
For Visual Studio 2005, you need to reference the 8.0.0.0 assemblies and your project must be an AnyCPU .NET 2.0 project.
For Visual Studio 2008, you need to reference the 9.0.0.0 assemblies and your project must be an AnyCPU .NET 3.0 project.
For Visual Studio 2010, you need to reference the 10.0.0.0 assemblies and your project must be an AnyCPU .NET 4.0 project.
For Visual Studio 2012, you need to reference the 11.0.0.0 assemblies and your project must be an AnyCPU .NET 4.0 project.
For Visual Studio 2013, you need to reference the 12.0.0.0 assemblies and your project must be an AnyCPU .NET 4.5 project.
For Visual Studio 2015, you need to reference the 14.0.0.0 assemblies and your project must be an AnyCPU .NET 4.6 project.
If you have multiple versions of Visual Studio installed, you need to deploy the assembly multiple times, once for each version of Visual Studio. These assemblies must have the same AssemblyName and the same AssemblyVersion and be signed with the same strong name.
The policies must each be registered in the registry under the following keys:
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\{VisualStudioVersion}\TeamFoundation\SourceControl\Checkin Policies
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\{VisualStudioVersion}\TeamFoundation\SourceControl\Checkin Policies (64 bit OS only)
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{VisualStudioVersion}_Config\TeamFoundation\SourceControl\Checkin Policies (should be added automatically by running devenv /setup)
A more extensive walkthrough can be found on my blog.
I had the same problem, a custom policy working on VS 2008/2010 don't install correctly in vs2013. Finally I opened the custom policy project in VS 2013, then I readded Microsoft.TeamFoundation.VersionControl.Client reference and compile it. Now it works and recognize as the same policy that VS2010.
I have a wonderful solution in Visual Studio 2012 with a Web project using WebAPI and a supporting Web Service project for data using Entity Framework (EF) Code First. I was just told I need to see about using Visual Studio 2010.
Is there something I can do to work on this project in Visual Studio 2010?
As Henrick answers: you do not upgrade/downgrade VS installs, rather you install versions side by side.
You note two technologies that might be problematic:
EF Code First: this is supported from 4.1 (or was it 4.2?) which is supported against .NET 4.0 and VS2010. Providing your not using enum or geo/spatial data types (which require .NET 4.5) this should work, but you'll need to ensure you update to the EF5 NuGet package for .NET 4.
WebAPI: This is new in MVC4, which comes with VS2012, but is a separate install for .NET 4/VS2010.
Finally. While some project types with round trip between VS2012 and VS2010 SP1 (you need the service pack) it is not true for all project types. Details are on MSDN.
You can install Visual Studio 2010 separately and open the project and see. There is no danger in having version 2005, 2008, 2010 or 2012 of Visual Studio installed.