错误MSB3644:找不到框架“ .NETFramework,Version = v3.5”的参考程序集-ubuntu

时间:2019-05-21 03:13:33

标签: c# .net ubuntu-16.04

多年前在Windows下,我正在一个最初由我不认识的其他人创建的旧项目上运行dotnet build命令,但是在我的Linux Ubuntu 16.04笔记本电脑上,它给了我错误:

/home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/sdk/2.2.204/Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found.

我昨天下载并安装了dotnet存档的dotnet-sdk-2.2.204-linux-x64 SDK,配置信息为:

$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.204
 Commit:    8757db13ec

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/sdk/2.2.204/

Host (useful for support):
  Version: 2.2.5
  Commit:  0a3c9209c0

.NET Core SDKs installed:
  2.2.204 [/home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.5 [/home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.5 [/home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.5 [/home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

.csproj文件包含:

<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectGuid>{1F89C6A7-BCC7-4B9A-AF06-4BA515541489}</ProjectGuid>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <OutputType>WinExe</OutputType>
    <RootNamespace>RoseauWin</RootNamespace>
    <AssemblyName>RoseauWin</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <AppDesignerFolder>Properties</AppDesignerFolder>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Platform)' == 'x86' ">
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <OutputPath>bin\Debug\</OutputPath>
    <DebugSymbols>True</DebugSymbols>
    <DebugType>Full</DebugType>
    <Optimize>False</Optimize>
    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <OutputPath>bin\Release\</OutputPath>
    <DebugSymbols>False</DebugSymbols>
    <DebugType>None</DebugType>
    <Optimize>True</Optimize>
    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
    <DefineConstants>TRACE</DefineConstants>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <ItemGroup>
    <Reference Include="Sanford.Multimedia">
      <HintPath>..\Sanford.Multimedia.Midi\bin\Debug\Sanford.Multimedia.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Configuration" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs" />
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Roseau.ComponentModel\Roseau.ComponentModel.csproj">
      <Project>{28F134E7-F044-4153-A8AE-0C18E6351635}</Project>
      <Name>Roseau.ComponentModel</Name>
    </ProjectReference>
    <ProjectReference Include="..\Roseau.Music.Generators\Roseau.Music.Generators.csproj">
      <Project>{DBE17471-321A-400D-97A9-ADCEBFE960EA}</Project>
      <Name>Roseau.Music.Generators</Name>
    </ProjectReference>
    <ProjectReference Include="..\Roseau.Music.Midi\Roseau.Music.Midi.csproj">
      <Project>{FF7B26FF-AB13-4FCC-AC85-9FD04C2D0F1A}</Project>
      <Name>Roseau.Music.Midi</Name>
    </ProjectReference>
    <ProjectReference Include="..\Roseau.Music\Roseau.Music.csproj">
      <Project>{9A4CF19C-B0A7-4D74-8B01-C479FE8C3019}</Project>
      <Name>Roseau.Music</Name>
    </ProjectReference>
    <ProjectReference Include="..\Roseau.Probability\Roseau.Probability.csproj">
      <Project>{CA266A83-CB09-4A37-9160-0E67B7035C9C}</Project>
      <Name>Roseau.Probability</Name>
    </ProjectReference>
    <ProjectReference Include="..\Roseau.Windows.Forms\Roseau.Windows.Forms.csproj">
      <Project>{CCAC8FF9-E2BD-4B76-B479-72D91D1170BD}</Project>
      <Name>Roseau.Windows.Forms</Name>
    </ProjectReference>
    <ProjectReference Include="..\Sanford.Multimedia.Midi\Sanford.Multimedia.Midi.csproj">
      <Project>{4269C72A-8D3A-4737-8F89-72EAA33EA9E1}</Project>
      <Name>Sanford.Multimedia.Midi</Name>
    </ProjectReference>
  </ItemGroup>
</Project>

上面的文件是构建文件吗?等价于Maven Java应用程序中的pom.xml文件?

我以前从未接触过.Net应用。

ToolsVersion="3.5"<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>是什么?

我可以编辑此文件吗?我可以更改哪个版本?

我已经看过这个page,希望我不必为了构建它而学到太多知识。毕竟,我正在使用Java和Typescript从头开始重写该应用程序。

0 个答案:

没有答案