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.

相關問題