1

嗨,伙计们我试图将Windows Phone 8.1应用程序迁移到Windows 10,我仔细地按照指示,但我总是得到错误参数targetplatformVersion不能为空。但它不是零,这里是我的.csproj文件的代码为什么我的参数targetplatformversion不能为null在微软视觉工作室

<?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)' == '' ">x86</Platform> 
    <TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion> 
    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion> 
    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier> 
    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion> 
    <ProductVersion>10.0.20506</ProductVersion> 
    <SchemaVersion>2.0</SchemaVersion> 
    <ProjectGuid>{7C06E7B5-5C0A-4D9E-BA59-D2A359546261}</ProjectGuid> 
    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 
    <OutputType>Library</OutputType> 
    <AppDesignerFolder>Properties</AppDesignerFolder> 
    <RootNamespace>MedeTraxAlert_Phase2</RootNamespace> 
    <AssemblyName>MedeTraxAlert_Phase2</AssemblyName> 
    <SilverlightVersion> 
    </SilverlightVersion> 
    <SilverlightApplication>true</SilverlightApplication> 
    <SupportedCultures> 
    </SupportedCultures> 
    <XapOutputs>true</XapOutputs> 
    <GenerateSilverlightManifest>true</GenerateSilverlightManifest> 
    <XapFilename>MedeTraxAlert_Phase2_$(Configuration)_$(Platform).xap</XapFilename> 
    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate> 
    <SilverlightAppEntry>MedeTraxAlert_Phase2.App</SilverlightAppEntry> 
    <ValidateXaml>true</ValidateXaml> 
    <ThrowErrorsInValidation>true</ThrowErrorsInValidation> 
    <ExpressionBlendVersion>5.0.40218.0</ExpressionBlendVersion> 
    <TargetFrameworkProfile /> 
    <DefaultLanguage>en-US</DefaultLanguage> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 
    <DebugSymbols>true</DebugSymbols> 
    <DebugType>full</DebugType> 
    <Optimize>false</Optimize> 
    <OutputPath>Bin\x86\Debug</OutputPath> 
    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> 
    <NoStdLib>true</NoStdLib> 
    <NoConfig>true</NoConfig> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    <PlatformTarget /> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 
    <DebugType>pdbonly</DebugType> 
    <Optimize>true</Optimize> 
    <OutputPath>Bin\x86\Release</OutputPath> 
    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> 
    <NoStdLib>true</NoStdLib> 
    <NoConfig>true</NoConfig> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    <PlatformTarget /> 
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' "> 
    <DebugSymbols>true</DebugSymbols> 
    <DebugType>full</DebugType> 
    <Optimize>false</Optimize> 
    <OutputPath>Bin\ARM\Debug</OutputPath> 
    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> 
    <NoStdLib>true</NoStdLib> 
    <NoConfig>true</NoConfig> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    <PlatformTarget /> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' "> 
    <DebugType>pdbonly</DebugType> 
    <Optimize>true</Optimize> 
    <OutputPath>Bin\ARM\Release</OutputPath> 
    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> 
    <NoStdLib>true</NoStdLib> 
    <NoConfig>true</NoConfig> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    <PlatformTarget /> 
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> 
    </PropertyGroup> 
    <ItemGroup> 
    <Compile Include="App.xaml.cs"> 
     <DependentUpon>App.xaml</DependentUpon> 
    </Compile> 
    <Compile Include="Common\CommonVariables.cs" /> 
    <Compile Include="Converters\AVPUResponseConverter.cs" /> 
    <Compile Include="Common\NeuroResponseConverter.cs" /> 
    <Compile Include="Converters\AlertListTextForegroundConverter.cs" /> 
    <Compile Include="Converters\AVPUResponseConvertor.cs" /> 
    <Compile Include="Converters\BooleanToColSpanConverter.cs" /> 
    <Compile Include="Converters\BooleanToVisibilityConverter.cs" /> 
    <Compile Include="Converters\ConcernConvertor.cs" /> 
    <Compile Include="Converters\ConsciousConvertor.cs" /> 
    <Compile Include="Converters\OxygenConvertor.cs" /> 
    <Compile Include="Converters\PupilSizeConvertor.cs" /> 
    <Compile Include="Converters\RespirationDistressConvertor.cs" /> 
    <Compile Include="Converters\LimbMovementConvertor.cs" /> 
    <Compile Include="Converters\GCSBestMotorResponseConvertor.cs" /> 
    <Compile Include="Converters\GCSBestVerbalResponseConvertor.cs" /> 
    <Compile Include="Converters\GCSEyesOpenResponseConvertor.cs" /> 
    <Compile Include="LocalizedStrings.cs" /> 
    <Compile Include="MainPage.xaml.cs"> 
     <DependentUpon>MainPage.xaml</DependentUpon> 
    </Compile> 
    <Compile Include="Models\AlertModel.cs" /> 
    <Compile Include="Models\AuthenticateUserModel.cs" /> 
    <Compile Include="Models\AcknowledgeModel.cs" /> 
    <Compile Include="Models\HistoryModel.cs" /> 
    <Compile Include="Models\HistoryRequestModel.cs" /> 
    <Compile Include="Models\UidAndUrlModel.cs" /> 
    <Compile Include="Properties\AssemblyInfo.cs" /> 
    <Compile Include="Resources\AppResources.Designer.cs"> 
     <AutoGen>True</AutoGen> 
     <DesignTime>True</DesignTime> 
     <DependentUpon>AppResources.resx</DependentUpon> 
    </Compile> 
    <Compile Include="UI\AlertsPage.xaml.cs"> 
     <DependentUpon>AlertsPage.xaml</DependentUpon> 
    </Compile> 
    <Compile Include="UI\AuthorisationPage.xaml.cs"> 
     <DependentUpon>AuthorisationPage.xaml</DependentUpon> 
    </Compile> 
    <Compile Include="Converters\CustomDateTimeAxis.cs" /> 
    <Compile Include="UI\HistoryDetailsPage.xaml.cs"> 
     <DependentUpon>HistoryDetailsPage.xaml</DependentUpon> 
    </Compile> 
    <Compile Include="UI\MessageDetailsPage.xaml.cs"> 
     <DependentUpon>MessageDetailsPage.xaml</DependentUpon> 
    </Compile> 
    <Compile Include="UI\RegistrationLoginPage.xaml.cs"> 
     <DependentUpon>RegistrationLoginPage.xaml</DependentUpon> 
    </Compile> 
    </ItemGroup> 
    <ItemGroup> 
    <ApplicationDefinition Include="App.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </ApplicationDefinition> 
    <Page Include="MainPage.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </Page> 
    <Page Include="UI\AlertsPage.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </Page> 
    <Page Include="UI\AuthorisationPage.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </Page> 
    <Page Include="UI\HistoryDetailsPage.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </Page> 
    <Page Include="UI\MessageDetailsPage.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </Page> 
    <Page Include="UI\RegistrationLoginPage.xaml"> 
     <SubType>Designer</SubType> 
     <Generator>MSBuild:Compile</Generator> 
    </Page> 
    </ItemGroup> 
    <ItemGroup> 
    <None Include="Fonts\SIXTY.TTF" /> 
    <AppxManifest Include="Package.appxmanifest"> 
     <SubType>Designer</SubType> 
    </AppxManifest> 
    <None Include="project.json" /> 
    <None Include="Properties\AppManifest.xml" /> 
    <None Include="Properties\WMAppManifest.xml"> 
     <SubType>Designer</SubType> 
    </None> 
    </ItemGroup> 
    <ItemGroup> 
    <Content Include="Assets\alarm.mp3" /> 
    <Content Include="Assets\AlignmentGrid.png" /> 
    <Content Include="Assets\ApplicationIcon.png"> 
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    </Content> 
    <Content Include="Assets\BadgeLogo.png" /> 
    <Content Include="Assets\Logo.png" /> 
    <Content Include="Assets\SplashScreen.png" /> 
    <Content Include="Assets\SquareTile150x150.png" /> 
    <Content Include="Assets\SquareTile71x71.png" /> 
    <Content Include="Assets\StoreLogo.png" /> 
    <Content Include="Assets\Tiles\FlipCycleTileLarge.png"> 
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    </Content> 
    <Content Include="Assets\Tiles\FlipCycleTileMedium.png"> 
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    </Content> 
    <Content Include="Assets\Tiles\FlipCycleTileSmall.png"> 
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    </Content> 
    <Content Include="Assets\Tiles\IconicTileMediumLarge.png"> 
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    </Content> 
    <Content Include="Assets\Tiles\IconicTileSmall.png"> 
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    </Content> 
    <Content Include="Assets\DrApp_AppIcon.png" /> 
    <Content Include="Assets\WideLogo.png" /> 
    <Content Include="Images\alarmIcon.png" /> 
    <Content Include="Images\BG_1080.png" /> 
    <Content Include="Images\ExclamationMark.png" /> 
    <Content Include="ReadMe.Coding4Fun.Toolkit.txt" /> 
    <Content Include="README_FIRST.txt" /> 
    <Content Include="Toolkit.Content\ApplicationBar.Add.png" /> 
    <Content Include="Toolkit.Content\ApplicationBar.Cancel.png" /> 
    <Content Include="Toolkit.Content\ApplicationBar.Check.png" /> 
    <Content Include="Toolkit.Content\ApplicationBar.Delete.png" /> 
    <Content Include="Toolkit.Content\ApplicationBar.Select.png" /> 
    <Content Include="Properties\default.rd.xml" /> 
    </ItemGroup> 
    <ItemGroup> 
    <EmbeddedResource Include="Resources\AppResources.resx"> 
     <Generator>PublicResXFileCodeGenerator</Generator> 
     <LastGenOutput>AppResources.Designer.cs</LastGenOutput> 
     <SubType>Designer</SubType> 
    </EmbeddedResource> 
    </ItemGroup> 

    <ItemGroup> 
    <BlendEmbeddedFont Include="Fonts\segoeuil.ttf"> 
     <IsSystemFont>True</IsSystemFont> 
     <All>True</All> 
     <AutoFill>True</AutoFill> 
    </BlendEmbeddedFont> 
    <BlendEmbeddedFont Include="Fonts\seguili.ttf"> 
     <IsSystemFont>True</IsSystemFont> 
     <All>True</All> 
     <AutoFill>True</AutoFill> 
    </BlendEmbeddedFont> 
    </ItemGroup> 
    <ItemGroup> 
    <WCFMetadata Include="Service References\" /> 
    </ItemGroup> 
    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" Condition="false"/> 

    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" Condition="true" /> 
    <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
     Other similar extension points exist, see Microsoft.Common.targets. 
    <Target Name="BeforeBuild"> 
    </Target> 
    <Target Name="AfterBuild"> 
    </Target> 
    --> 
    <ProjectExtensions /> 
    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Expression\Blend\WindowsPhone\v8.0\Microsoft.Expression.Blend.WindowsPhone.targets" /> 
    <Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> 
    <Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> 
    <Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> 
    </Target> 
</Project> 

我做了什么错?

+0

请尝试修复您的Windows 10 SDK和VS2015社区UPDATE2在报道控制面板中,此例外表明目标平台版本设置不正确。 –

回答

1

看看上面粘贴的.csproj示例中的一些条目,它看起来像是在尝试将Windows Phone 8.0或Windows Phone 8.1应用程序迁移到UWP。没有什么东西都被正确地迁移了,因此会跳过Visual Studio项目系统(例如标签)。

您是否遵循了此MSDN文章中的所有步骤? https://msdn.microsoft.com/en-us/library/mt148501.aspx#MigrateCSharp

我发现迁移到是一个空白的新UWP项目添加到解决方案,然后再复制C#/ XAML文件,其他资产等。或者,创建一个空白UWP应用程序最简单的方法,和然后将.csproj与您拥有的那个进行比较 - 差异应立即弹出。

0

这里碰到..看起来同样的问题是当我安装Visual Studio 2015社区更新3从ISO映像以及独立的14393.33 sdk。

我有两台安装了相同开发软件的机器。

我在一台机器上得到了上述问题,而另一台机器却没有。

我怀疑这是一个网络问题。

我为什么这么说?由于Windows SDK在通过我面对此目标platformversion问题的同一网络进行安装时也存在问题。 然后,我通过切换到现有网络上的VPN并正确安装sdk,克服了SDK安装问题。 但不幸的是,我无法继续通过VPN安装VS的其余部分。

现在为我的第二台机器安装了相同的软件,但这次我正在使用我的办公网络和visual studio正确安装,没有与targetPlatformVersion报告相关的问题。

现在对于其面临的问题在同一台机器上的扭曲,我可以证实的是,同样的问题是不是与Visual Studio 15预览4.

相关问题