2017-05-08T11:08:05.5484278Z Build FAILED.
2017-05-08T11:08:05.5524283Z
2017-05-08T11:08:05.5534280Z "C:\a\1\s\i2M.WebApp.sln" (default target) (1) ->
2017-05-08T11:08:05.5534280Z "C:\a\1\s\src\i2M.WebApp\i2M.WebApp.csproj" (default target) (2) ->
2017-05-08T11:08:05.5534280Z "C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj" (default target) (3:2) ->
2017-05-08T11:08:05.5534280Z (CoreCompile target) ->
2017-05-08T11:08:05.5534280Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(14,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5534280Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(15,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5534280Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(16,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(17,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(18,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(19,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(20,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(21,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(14,55): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(15,61): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(16,59): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(17,59): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(18,68): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(19,55): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(20,53): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(21,55): error CS0518: Predefined type 'System.String' is not defined or imported [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(11,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5544291Z obj\Debug\netstandard1.4\i2M.Domain.AssemblyInfo.cs(12,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z "C:\a\1\s\i2M.WebApp.sln" (default target) (1) ->
2017-05-08T11:08:05.5584611Z "C:\a\1\s\src\i2M.WebApp\i2M.WebApp.csproj" (default target) (2) ->
2017-05-08T11:08:05.5584611Z "C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj" (default target) (3:2) ->
2017-05-08T11:08:05.5584611Z (GenerateBuildDependencyFile target) ->
2017-05-08T11:08:05.5584611Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Assets file 'C:\a\1\s\src\i2M.Domain\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\a\1\s\src\i2M.Domain\i2M.Domain.csproj]
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z "C:\a\1\s\i2M.WebApp.sln" (default target) (1) ->
2017-05-08T11:08:05.5584611Z "C:\a\1\s\src\i2M.WebApp\i2M.WebApp.csproj" (default target) (2) ->
2017-05-08T11:08:05.5584611Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Assets file 'C:\a\1\s\src\i2M.WebApp\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\a\1\s\src\i2M.WebApp\i2M.WebApp.csproj]
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z "C:\a\1\s\i2M.WebApp.sln" (default target) (1) ->
2017-05-08T11:08:05.5584611Z "C:\a\1\s\test\i2M.WebApp.Tests\i2M.WebApp.Tests.csproj" (default target) (4) ->
2017-05-08T11:08:05.5584611Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Assets file 'C:\a\1\s\test\i2M.WebApp.Tests\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\a\1\s\test\i2M.WebApp.Tests\i2M.WebApp.Tests.csproj]
2017-05-08T11:08:05.5584611Z
2017-05-08T11:08:05.5584611Z 0 Warning(s)
2017-05-08T11:08:05.5584611Z 21 Error(s)
2017-05-08T11:08:05.5624547Z
dotnet restore is the right thing to use here. In an upcoming sprint, we'll be updating the dotnet task to work with authenticated feeds.
If you need authenticated feed support with .NET Core projects today, there are two steps:
Add a NuGet Tool Installer task to your build and specify version 4.1.0.
Add a NuGet task to your build, select the restore command, and configure the task appropriately for your solution/project.
I need to use .NET Core with authenticated VSTS nuget feed? I am getting a 401 error now. How do i authenticate with user name and VSTS PAT?
C:\Program Files\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : Unable to load the service index for source https://vsts.url.com/nuget/v3/index.json. [d:\a\1\s\myproject.csproj]
2017-09-05T15:06:52.4907364Z C:\Program Files\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : Response status code does not indicate success: 401 (Unauthorized). [d:\a\1\s\myproject.csproj]
I'm facing the exact same issue. I tried many ways but the build is still failing.
I've created a stack-overflow question.
https://stackoverflow.com/questions/46155449/use-vsts-to-build-a-solution-with-vsts-packages-and-old-style-csproj
Thanks,
dstj, jholt456, nmalyarsky, barelabs, BStrat77, and hyper4mance reacted with thumbs up emoji
tjoudeh and Amit-Kumar-Sonkar reacted with hooray emoji
jps, rsaa, and GuilhermeMorais reacted with heart emoji
All reactions
What if I am trying to build using docker image microsoft/aspnetcore:1.0-2.0 ?
dotnet restore just ignores the credentials from nuget.config in the project/solution dir.
Any way to build with private NuGet feeds?
I'm not super-familiar with the docker image you referenced, but you might try passing the --configFile flag to the dotnet restore step in the container. Note that this will only use that config (i.e. it won't also include the machine-level nuget.config that contains nuget.org), so you'll need to add a line in the config for nuget.org if you use packages from there.
Yet another one of those amazing GitHub threads that pops up when you Google some absurd issue with the buggy Visual-Studio-Of-The-Week drop.
@alexmullans self-assigns the bug, closes it before a fix is shipped, and here it sits for months.
See this over and over in Microsoft's absurd use of GitHub. Stop it!
Hey guys, i know this is closed but I have an existing solution that I recently added a brand new nodejs project to (using the out of the box template from VS) ... I told it to add that to source control and attempted a check in to which the build server (delegated by VSTS, all up to date with VS 2017 and nuget 4.6) responded with this ...
2018-03-20T14:34:17.4906031Z ##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(154,5): Error : Assets file 'C:\BuildAgent\_work\1\s\Dev\Shell\NodeApp\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
based on the advice given above I added a dotnet restore command following the get sources step and it made no difference ... same exception.
Is there a patch expected for this or a work around?
from above dated july 12th 2017 ... @alexmullans ...
Closing this for now. The updated dotnet task (with support for authenticated feeds) should land in the next deployment (3.5ish weeks). Please keep an eye out for that and give it a shot.
... still looks pretty broken to me :(
I also noticed some weird stuff ...
The dotnet step / command asks for "path to project(s)" and a build step asks for "Solution".
The former i noticed is attaching the pattern match as a physical path search where as the latter is expecting a virtual path.
Can you guys please try to be more consistent in the future, perhaps it might be best to always use virtual paths?
@TehWardy are you using dotnet restore and then Visual Studio Build? Not sure that'll work. You'll probably want to use either NuGet + Visual Studio Build (for .NET Framework projects) or dotnet restore and dotnet build (for .NET Core projects). Solution is a concept in .NET Framework that is mostly unused in .NET Core, which is why the different tasks use different text.
If that still doesn't work, please feel free to open a question on Developer Community.
oh ok ... I use VS build and did have a nuget restore step in the process prior to adding a dotnet restore step.
I've noticed all my old solution even if I do a clean up of the build cache on the build server seems to build fine without a nuget or dotnet restore step in the process ... in fact a nuget restore step comes up with build warnings actively saying "dot use this, it's redundant".
Either way both restoration steps result in the same build failure.
I'll raise my question over on the dev community but this feels like a bug to me as dotnet core projects appear to not work in the same way that older dot net projects worked "out of the box" with a standard VS build step.
Just remove the local repo from
C:\Users\<username>\Documents\Visual Studio 2017\Projects\Chromely\src\nuget.config
with a text-editor, and it will work.
@abhijeetsinha9 This was solved a while ago ...
These days I don't do a restore at all for .Net core projects I just do a build or publish and that does the restore for you.
There is a bit of a gotcha though ... if using cloud based build servers provided by Microsoft they change the versions of .Net Core often as a result of ongoing progress so if you don't keep up you start to find older projects break.
The fix is simply to migrate your project to the latest .Net Core version.