【问题标题】:Converting a Portable Class Library Project .csproj file from Version 2 (Beta) back to Version 1将可移植类库项目 .csproj 文件从版本 2 (Beta) 转换回版本 1
【发布时间】:2012-05-15 18:01:05
【问题描述】:

我目前正在尝试在 VS10、VS11 和 MonoDevelop3 之间前后移动大量代码。

似乎 MonoDevelop3 对 PCL1 有一些初步支持,但现在 VS10 和 VS11 都使用 PCL2(Beta) - 因为我将 VS11 安装在与 VS10 相同的 PC 上。

为了让 MonoDevelop3 加载这些 PCL2(Beta) 项目,我正在尝试手动操作 PCL 项目。

这似乎不像更改 .csproj XML 文件中的 TargetProfile 那样简单 - 似乎还需要更多……但我不知道是什么。

有谁知道 PCL2 和 PCL1 之间的确切区别是什么?或者我如何手动转换 PCL2 项目文件以便将它们加载到 MonoDevelop 中?

谢谢

斯图尔特

一个示例 PLP2 项目文件看起来有点像:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{B6E27475-E7D0-448C-A5CC-5097DCA1E2DD}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Cirrious.MvvmCross</RootNamespace>
    <AssemblyName>Cirrious.MvvmCross</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <TargetFrameworkProfile>Profile104</TargetFrameworkProfile>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Windows" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Application\MvxApplication.cs" />
    etc
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
</Project>

【问题讨论】:

    标签: monodevelop visual-studio-2012 portable-class-library


    【解决方案1】:

    现在结束这个问题。

    在仔细研究之后......项目文件之间似乎没有任何显着差异。

    相反,monoDevelop 对这些文件的支持似乎还很年轻,如果你想在 MonoDevelop (3.0.2) 中打开这些文件,你必须使用 Profile1

    所以使用:

    <TargetFrameworkProfile>Profile1</TargetFrameworkProfile>
    

    没有

    <TargetFrameworkProfile>Profile2</TargetFrameworkProfile>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-14
      • 2021-10-03
      • 1970-01-01
      • 2018-04-27
      • 1970-01-01
      • 2015-09-02
      • 2012-09-20
      相关资源
      最近更新 更多