[dotnet build] Can't replace MVC packages with sources
See original GitHub issueSteps to reproduce
Part of this verification task: aspnet/Release#10
Steps:
- Create web app project
- Clone https://github.com/aspnet/Mvc
- Add path to Mvc\src to global.json
- Restore (right-click project in Solution Explorer and click “Restore packages”) so VS sees new source refs (related: dotnet/sdk#4596)
- Build
Expected: my app should compile fine and I should be able to run it.
Actual: Severity Code Description Project File Line Suppression State Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.ViewFeatures\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.ViewFeatures.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.TagHelpers\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.TagHelpers.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Razor.Host\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.Razor.Host.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Razor\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.Razor.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Localization\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.Localization.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Json\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.Formatters.Json.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.DataAnnotations\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.DataAnnotations.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Cors\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.Cors.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Core\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.Core.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.ApiExplorer\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.ApiExplorer.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc.Abstractions\bin\Debug\netstandard1.3\Microsoft.AspNetCore.Mvc.Abstractions.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Error c:\users\cesars\documents\visual studio 2015\Projects\VerifyReplacePackagesWithSources\src\VerifyReplacePackagesWithSources\error CS0006: Metadata file ‘D:\src\aspnet\Mvc\src\Microsoft.AspNetCore.Mvc\bin\Debug\netstandard1.5\Microsoft.AspNetCore.Mvc.dll’ could not be found VerifyReplacePackagesWithSources C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241
Expected behavior
Find binaries in correct place.
Actual behavior
It’s looking for MVC binaries in the wrong places.
Environment data
dotnet --info
output:
C:\Windows\system32>dotnet --info .NET Command Line Tools (1.0.0-rc2-002678)
Product Information: Version: 1.0.0-rc2-002678 Commit Sha: 3b2ea9d14b
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:21 (10 by maintainers)
Top GitHub Comments
I am a bit surprised why that matters and why you don’t “just try to do it”… I tried this repro steps as they were assigned to a bug for my team and was able to repro it within 5 mins, but extra questions in this issue postponed investigation for 1 extra day already. I am not trying to be a “smart ass”, but really it is just a pattern I noticed for some cli issues… Below is my global.json and as you would see that you could just do same thing without me yesterday, there not many choices how to specify folder and it does not matter for actual problem in this issue …
Here is my global.json:
{ “projects”: [ “src”, “test”, “D:\git\ms\aspnet\Mvc\src” ] }
I’m having this same problem now. I used to do this app the time with my rc1 aspnet app. Getting same errors as @abpiskunov now with RC2.
Anyone have a workaround?