mrward/monodevelop-dnx-addin

Creating a .NETCore project works, but reopening an existing one fails on the new Xamarin Studio 6.0

bravecobra opened this issue · 3 comments

To reproduce:

  • create a new .NET Core package with the wizard.
  • Close the solution
  • reopen the solution

It worked perfectly on 5.10, but fails with the new Xamarin Studio 6.0

Unable to reproduce this.

Can you provide more information? How does it fail?

Can you attach the IDE log? (Help - Open Log Directory).

What is the output from the .NET Core console? (View - Pads - .NET Core Output)

I had already downgraded to 5.10, however on a test machine, I upgraded again to provide you the needed info.
So I created a .NET Core Class library and let the dependencies restore. Building works. Then I close the solution.
2016-06-09 11_29_13-testcore - myclass cs - xamarin studio community

When I reopen the solution (even without closing Xamarin Studio), I get the following dialog
2016-06-09 11_29_48-

After clicking ok, I see my solution has failed to load.
2016-06-09 11_31_15-c__users_james_documents_projects_testcore_src_testcore_myclass cs - xamarin stu
2016-06-09 11_32_45-c__users_james_documents_projects_testcore_src_testcore_myclass cs - xamarin stu

The output of the .NET Core console doesn't provide much information.
2016-06-09 11_33_55-c__users_james_documents_projects_testcore_src_testcore_myclass cs - xamarin stu

The log might be more useful to you, I think, since it contains the exception.

Ide.2016-06-09__11-19-10.log.txt

I hope this helps.

This seems to be a problem if you have Visual Studio 2015 and possibly the ASP.NET Core tooling. One of the installers, either .NET Core or the ASP.NET Core installer, adds .NET Core custom MSBuild properties files and targets files. So the machine will have the $(VSToolsPath)\DotNet\Microsoft.DotNet.Props file and it looks like Xamarin Studio 6.0 is reading it.

In the DotNet.Props file we have:

<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>

The TargetFrameworkVersion is overridden in the created .xproj but the TargetFrameworkProfile is left as Client.

A workaround for now is to comment out the DotNet.Props import in the .xproj

  <!--<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />-->