It seems that I can not find anyone with this problem, and it made me stretch my hair for hours. I am working on a .net project with a team of people. I understand that my version is quite outdated and updated to version 1.0.4. However, since the update, I can no longer create or run the project without errors.
C: \ Program Files \ DotNet \ SDK \ 1.0.4 \ SDKs \ Microsoft.NET.Sdk \ build \ Microsoft.PackageDependancyResolution.targets (154.5): Error: Asset file 'C: \ Users \ ZL \ Documents \ Lynx \ lynx% 20project \ SRC \ Lynx.Web \ OBJ \ project.assets.json 'not found. Run NuGet package repair to create this file. [C: \ Users \ ZL \ Documents \ lynx \ lynx% 20project \ SRC \ Lynx.Web \ Lynx.Web.csproj] obj \ Debug \ netcoreapp1.1 \ Lynx.Web.AssembleyInfo.cs (6,12): error CS0246: The type or namespace name "System" could not be found (are you missing a directive or an assembly reference?)
[C: \ Users \ ZL \ Documents \ lynx \ lynx% 20project \ SRC \ Lynx.Web \ Lynx.Web.csproj]
These files exist and look great. I launched dotnet restoreand dotnet clean. I tried to destroy the obj and bin folders and restore them. I destroyed the NuGet cache. I tried uninstalling .NET Core and reinstalling it. I even completely washed off my code and pulled out the new version from git. Other team members can create code perfectly, and it works on other machines, and not on my Windows 10 computer. It seems dotnet recovery should fix this, and everywhere I found that when researching such problems, this was a fix. Some version of something is out of sorts, but I cannot understand. Is there something I need to update that I am missing?
** EDITED add csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Lynx.Web</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Lynx.Web</PackageId>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<Compile Remove="node_modules\**\*" />
<None Update="ClientApp\dist\**\*;Views\**\*;wwwroot\**\*">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
<None Update="wwwroot\dist\*.map">
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0-*" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="1.0.2" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="1.0.0" />
<PackageReference Include="IdentityServer4" Version="1.2.0" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="1.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.1.1" />
</ItemGroup>
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="npm install" />
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" />
<Exec Command="node node_modules/webpack/bin/webpack.js --env.prod" />
</Target>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="1.0.0" />
</ItemGroup>
</Project>
Thanks in advance.
source
share