Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate an error message if LanguageTargets property is not set and cannot be inferred #448

Closed
dsplaisted opened this issue Dec 2, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@dsplaisted
Copy link
Member

Sdk.targets will import the CSharp or VisualBasic targets files depending on whether the project file extension is .csproj or .vbproj. The LanguageTargets property can also be set to specify the targets file to import.

If LanguageTargets isn't set and the project file extension is neither .csproj nor .vbproj, then the build should fail with a helpful error. This could happen if someone didn't specify the F# SDK for an .fsproj, for example.

@enricosada
Copy link
Contributor

enricosada commented Dec 5, 2016

Hi @dsplaisted i think is good to have an error there.
But how can add a remote sdk (not bundled in cli?) with Sdk attribute? i want to populate LanguageTargets BEFORE Microsoft.NET.Sdk, so f# will work using Sdk attribute style.
Atm adding anything FSharp.NET.Sdk/1.0.0-beta-1;Microsoft.NET.Sdk fail with errror because try to search FSharp.NET.Sdk in the cli subdirectory \Sdks\FSharp2.NET.Sdk\Sdk\Sdk.props. Shouldnt that work also for remote packages? or just for bundled? /cc @piotrpMSFT

@enricosada
Copy link
Contributor

NVM, i see for current msbuild RC, the sdk packages are just simulated (so expected to work from sdk directory), right @dsplaisted ? If like that i'll wait for next RC2 when sdk packages can be downloaded from nuget

@rainersigwald
Copy link
Member

@enricosada That's correct, there's no acquisition story for Sdks yet. dotnet/msbuild#1436 tracks that.

@srivatsn srivatsn added the Bug label Dec 15, 2016
@srivatsn srivatsn added this to the 1.0 RTM milestone Dec 15, 2016
dsplaisted added a commit to dsplaisted/sdk that referenced this issue Dec 20, 2016
dsplaisted added a commit to dsplaisted/sdk that referenced this issue Dec 20, 2016
mmitche pushed a commit to mmitche/sdk that referenced this issue Jun 5, 2020
GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants