none
Converted projects load takes much longer and build issues

    Question

  • We have a VS 2015 solution with a number of projects. In preparation to have a single code base that we can build for the .NET Framework (net35 target in many cases) as well as for netstandard and .NET Core, we have manually converted the csproj files to the new 2017 file format. This has given us a great appreciation for the differences in the formats, but in the end, we're finding that it takes longer for the converted projects to load.

    Another problem we see is that if we try changing the entry in the <TargetFrameworks> section of a csproj file, Visual Studio will often hang requiring a hammer from the task manager to unload it.

    Has anyone run into these issues? Has anyone been converting .NET Framework projects to the new csproj file format, even without addressing .NET Standard or .NET Core targets? 


    Monday, April 17, 2017 8:16 PM

All replies

  • Hi Bob-Uva,

    Thanks for posting here.

    Do you want to convert old csproj to new csproj?

    As far as I know that you don't need to convert your .csproj file. VS2017 will continue to work with the classic csproj file just fine. In addition there is nothing in VS2017 that will perform the upgrade for you. Besides, convert to new .csproj can't be done for more complex project types but console and libraries appear to be upgradable. It may be worth your time to look at these documents:

    http://www.natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/

    https://github.com/NickCraver/PerfBenchmarks/commit/53c3013b1774056363dcab867bceb1b89ce9592c

    Hope this can help you.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 18, 2017 11:12 AM
  • We have already looked at the article by Nate McMaster. The reason we're doing the conversion is that we want to have a single source base for our libraries which will target .NET Standard 2.0. We are moving code that will not build as .NET Standard 2.0 into separate libraries that are specific to .NET Framework or .NET Core.

    That is the reason why we want to convert the formats of the csproj files. I think that this is a reasonable approach. Can you run this by the development team for Visual Studio and MSBuild?

    Thanks,

    Bob

    Tuesday, April 18, 2017 6:03 PM
  • @Bob, I have created a blank .net Framework class library on Visual Studio 2015, then Converted project to new csproj file format according the Nate McMaster`s blog, but it loaded quickly on the Visual Studio 2017. You can try to use a blank project to check if the conversion works fine. If you still have this problem, could you please share us the detail steps for how did you convert the .csproj file and the new .csproj file of the blank project?

    For the problem: Another problem we see is that if we try changing the entry in the <TargetFrameworks> section of a csproj file, Visual Studio will often hang requiring a hammer from the task manager to unload it.

    I have also encountered this issue. If we change the entry in the <TargetFrameworks> section of a csproj file after right click project->Edit xx.csproj directly, we will encountered that issue. That should be an issue for Visual Studio. I have found a workaround for this issue. If you want to change the <TargetFrameworks> section, you can right the project, Unload the project->edit the xx.csproj->change the value->Reload the project.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Wednesday, April 19, 2017 6:48 AM