I have started getting following errors on projects containing PostSharp 6.6.6 nuget in Visual Studio 2022(64bit Version 17.3.6).
Warning PS0219 The targeting pack for platform ".NETFramework,Version=v4.6.2" is not installed. Please install the appropriate targeting pack. Project C:\Project\POSTSHARP
Warning PS0262 PostSharp encountered some recoverable errors while parsing the pdb file of Project.dll. The debugging experience may be affected. Project C:\Project\POSTSHARP
Those messages a bit disturbing, because projects are targeting .NET CORE 3.1 App(not UWP).
Unfortunately "debugging experience" is affected. My break points in projects r not getting hit. What also unfortunate, that I could not remove Postsharp from the projects, which could be a solution but, alas, not in my case.
Cleaning, rebuilding, restarting did make any difference, obviously.
I could not find any reason why PostSharp are looking for .NET Framework on projects, which r not utilizing that framework.
Does anybody could shed some light why PostSharp behaves like that?
UPDATE
After Upgrading PostSharp nuget to version 6.10.15 message about "recoverable errors" went away, tests started to behave as they suppose to. But message about .Net Framework is still there. It does not look like it has any consequence, but I am curious why it PostSharp so hanged on 4.6.2 version.
You are using an old PostSharp version, support of which ended December 27, 2020 (it was not an LTS version), see this.
This version is not compatible with Visual Studio 2022.
There are two options:
Upgrade to PostSharp 6.10.x.
Use Visual Studio 2019. A reliable version would be 16.4 LTS release, which was released before PostSharp 6.6.6, but its support ended Oct 12, 2021. However, it's likely that the latest LTS version (16.11) of VS 2019 would work without problems.
Related
Just installed .NET Core version 3.1.
I'm using Visual Studio 2019, version 16.4.2, so it should be compatible.
But when I try to "create a new project" nothing Core-related shows up in the list, no matter how many ways I try to query.
I'm told it should show up but it doesn't. Haven't a clue as to why (I assume I've missed a step along the way).
VS 2019 16.4.x will always have .NET Core 3.1 as its main target by default, and VS 2019 16.4.0 or later will always install .NET Core 3.1.100 SDK if you select .NET Core workload when you install VS 2019.
If it's not shown when creating new project, then you have to ensure that you have selected the .NET Core workload when you install VS 2019:
Eriawan's answer pointed me in the right direction. The problem was, as suspected, very simple. I had bypassed Core when first installing VS 2019. Just had to use the Installer and install to fix.
When I first open the solution in VS2017 and trying to build a project, I get many errors and warnings in the Error list window. The project I'm trying to build is from Github (https://github.com/KirillOsenkov/SourceBrowser). Visual studio is throwing the below error. The solution has .net core 2.1 and .net framework 4.7.2. Both are already installed in my machine too.
I'm not sure what fixed it for me, but I installed visual studio 2015 update 3 on my machine and also updated VS2019 and VS2017 and then built the solution again. Now it builds successfully in both VS2017 and VS2019. It looks like some other package or library that supports this also installed during the update process.
Running into a problem I've not encountered before.
Fresh install of Visual Studio 2017 on Windows 7 enterprise.
Before updating Visual Studio I did not encounter Issue 1.
Ran update on Visual Studio to get to version 15.8
This appears to have also updated dotnet core to 2.1.4
Issue 1
Before upgrading to 15.8 this was not an issue.
Since I have upgrade Visual Studio i am met with the following error when trying to open eShopOnContainers
I have read the answers on a very much related question, here Project file is incomplete. Expected imports are missing though nothing has helped.
Issue 2
May be related, though trying to scaffold a dbContext for EF Core and receiving this error message in the Package Manager Console.
The error message seems pretty self explanatory, except for the fact that i have the following versions installed:
I've tried removing each of the installed versions though nothing seems to get me past either of these issues.
I've tried repairing visual Studio and also the dotnet installs. Again, nothing helps.
Any idea what i have wrong? All seems to be since i upgraded to 15.8...
Please install x86 version of dotnet core SDK as well
I was having the same problem - Project file is incomplete. Expected imports missing.
After installing the x86 version of the .net core sdk, Visual studio was able to open my .net core project.
My issue is resolve by installing x86 version of dotnet core SDK
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.
I am going to install Visual Studio. I want to know if the latest version of Visual Studio 2010 is backward compatible with previous versions like VS 2005 and 2008. Or is the code functionality and deploy-ability more dependent on the .NET framework version.
I am trying to use a code which will be built into dll. I am not sure in which version of VS the code was written(most probably VS 2005).
Thanks...
I would suggest to go with the latest Version.
VS 2010 can target multiple frameworks.
http://msdn.microsoft.com/en-us/library/bb398197.aspx
So the dll should know with which framework it was compiled...
I have never found any issues with Visual Studio 2010 and previous versions' code. It also does feature significantly improved Intellisense and [IMHO] faster building.
they are all backward compatible
2005 and above allow you to target the framework you want when creating
the project
if the project is older
than the VS, it will prompt you with
a migration wizard upon opening
it(this is a one time only step.
Couple of things to note that i've found with 2010 which have caused us a couple of issues:
1) NHibernate (Castle Proxy) doesn't work with .net framework 4 (Currently)
2) Test Projects are always created aimed at .net framework 4, and you cannot target a lower version of the framework.
Otherwise not many problems, its also nice that the database addition of Visual Studio 2010 has intellisense on your tables/views, as well as many other changes
Always go with the latest, now 2010