Visual Studio Mac - framework not found

845 views Asked by At

I got following error, in Visual Studio for Mac, trying compile a .net core application.

/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(5,5): 
Error MSB3644: The reference assemblies for framework ".NETCoreApp,Version=v1.0" were not found. To resolve this, 
install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. 
Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. 
Therefore your assembly may not be correctly targeted for the framework you intend. (MSB3644) (Backend)

Yesterday this still worked!

And here my csproj:

<PropertyGroup>
  <OutputType>Exe</OutputType>
  <TargetFramework>netcoreapp1.0</TargetFramework>
  <PreserveCompilationContext>true</PreserveCompilationContext>
  <RootNamespace>backend</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  <DebugType></DebugType>
  <OutputPath>..\..\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <OutputPath>..\..\bin\</OutputPath>
</PropertyGroup>
<ItemGroup>
  <Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
  <EmbeddedResource Include="**\*.resx" Exclude="$(GlobalExclude)" />
  <Compile Remove="Controller\Controller\SomController.cs" />
  <Compile Remove="Controller\Controller\UserController.cs" />
  <Compile Remove="Controller\SomController.cs" />
  <Compile Remove="Dto\LoginResultDto.cs" />
  <Compile Remove="Dto\UserDto.cs" />
  <Compile Remove="Models\SessionDto.cs" />
  <Compile Remove="Models\UserDto.cs" />
  <Compile Remove="Helper\SHA256.cs" />
  <Compile Remove="Filter\AuthFilter.cs" />
  <Compile Remove="Annotation\AllowAnonymousAccessAttribute.cs" />
  <Compile Remove="Database\BackendDbContext.cs" />
  <Compile Remove="Database\BackendDbInitializer.cs" />
</ItemGroup>

<ItemGroup>
  <PackageReference Include="Microsoft.NETCore.App">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.NET.Sdk.Web">
    <Version>1.0.0-alpha-20161104-2-112</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.AspNetCore.Diagnostics">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.Extensions.Logging.Console">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.AspNetCore.Mvc">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.AspNetCore.Mvc.Core">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.EntityFrameworkCore">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.AspNetCore.StaticFiles">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.Extensions.Logging.Debug">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.Extensions.Configuration.Json">
    <Version>1.1.0</Version>
  </PackageReference>
  <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions">
    <Version>1.1.0</Version>
  </PackageReference>
</ItemGroup>

<ItemGroup>
  <Folder Include="Controller\" />
</ItemGroup>
<ItemGroup>
  <None Include="appsettings.json">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </None>
</ItemGroup>
<ItemGroup>
  <ProjectReference Include="..\BackenShared\BackenShared.csproj">
    <Project>{FC12C26A-316C-4B63-8A81-3A284F9AC04A}</Project>
    <Name>BackenShared</Name>
  </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

I have installed .net core version 1.1.0.

When i change

<TargetFramework>netcoreapp1.0</TargetFramework>

to

<TargetFramework>netcoreapp1.1</TargetFramework>

It still the same error! How i can fix this? How i can tell, Visual Studio to find the Framework?

0

There are 0 answers