Comments (2)
I was able to resolve those compiler errors by doing the following
- Change
<Project Sdk="MSBuild.Sdk.Extras/3.0.44">
to<Project Sdk="Microsoft.NET.Sdk">
- Add
<OutputPath>bin</OutputPath>
within<PropertyGroup></PropertyGroup>
- Add
<Import Project="$(MSBuildProgramFiles32)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets" />
However, I get the following warning message:
C:\Program Files\dotnet\sdk\7.0.401\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(37,3): warning MSB4011: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.CSharp.targets" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets (20,5)". This is most likely a build authoring error. This subsequent import will be ignored. [E:\github\icnocop\MSBuildSdkExtras\Tests\SilverlightApplicationExtras\SilverlightApplicationExtras.csproj]
Is there a way to resolve the warning message?
Thank you.
from msbuildsdkextras.
I was able to resolve it using the following:
<Project Sdk="MSBuild.Sdk.Extras/3.0.44">
<PropertyGroup>
<TargetFrameworks>sl5</TargetFrameworks>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SilverlightApplicationExtras</RootNamespace>
<AssemblyName>SilverlightApplicationExtras</AssemblyName>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>true</SilverlightApplication>
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>SilverlightApplicationExtras.xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>SilverlightApplicationExtras.App</SilverlightAppEntry>
<TestPageFileName>SilverlightApplicationExtrasTestPage.html</TestPageFileName>
<CreateTestPage>true</CreateTestPage>
<ValidateXaml>true</ValidateXaml>
<EnableOutOfBrowser>false</EnableOutOfBrowser>
<OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
<UsePlatformExtensions>false</UsePlatformExtensions>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<LinkedServerProject>
</LinkedServerProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWpf>true</UseWpf>
<ImportFrameworkWinFXTargets>true</ImportFrameworkWinFXTargets>
<OutputPath>bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Windows" />
<Reference Include="system" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Xml" />
<Reference Include="System.Windows.Browser" />
<Reference Include="System.Windows.Controls" />
<Reference Include="System.Windows.Controls.Navigation" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AppManifest.xml" />
</ItemGroup>
<ItemGroup>
<Page Include="**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
</ItemGroup>
<Target Name="BeforeMarkupCompilePass1" BeforeTargets="MarkupCompilePass1">
<ItemGroup>
<Page Include="**\*.xaml" Exclude="App.xaml;**\bin\**\*.xaml;**\obj\**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
</ItemGroup>
</Target>
<Target Name="BeforeMainResourcesGeneration" BeforeTargets="MainResourcesGeneration">
<RemoveDuplicates Inputs="@(MainEmbeddedFiles)">
<Output
TaskParameter="Filtered"
ItemName="UniqueMainEmbeddedFiles"/>
</RemoveDuplicates>
<ItemGroup>
<MainEmbeddedFiles Remove="@(MainEmbeddedFiles)" />
<MainEmbeddedFiles Include="@(UniqueMainEmbeddedFiles)" />
</ItemGroup>
</Target>
</Project>
from msbuildsdkextras.
Related Issues (20)
- SDK folder for UAP not found HOT 2
- Update to Microsoft.NETCore.UniversalWindowsPlatform 6.2.12 HOT 2
- Per-RID project is only built once when referenced from another (non-Extras) project HOT 1
- MSB4057: GetCopyToPublishDirectoryItems missing for per-RID project
- Support Xamarin.Mac FullFramework projects
- Azure DevOps Unable to find package MSBuild.Sdk.Extras HOT 6
- Does Xamarin.iOS10 use IOS14 SDK? Is there a list of all the supported TFMs
- Unable to add reference to netstandard through Visual Studio UI
- Failures with GetDirectoryName HOT 1
- Do I still need MSBuild.Sdk.Extras with .net6? HOT 3
- NET6_0 constants not properly defined HOT 3
- Visual Studio 2019 hangs when loading project using MSBuild.Sdk.Extras HOT 1
- Could not use with F#
- VS2022 Preview 5 Mac - unable to find the SDK (SDK not found error) HOT 2
- NETFX_CORE not working with the latest version
- MSBuild.Sdk.Extras cannot build the TargetFrameworks Xamarin.iOS and net6.0-ios together HOT 6
- Is it possible to build a different output for the same TargetFramework
- UWP references fail when setting TargetPlatformMinVersion HOT 1
- Readme references a site sporting a database error.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuildsdkextras.