Open AndriySvyryd opened 8 years ago
@AndriySvyryd can you share your project.json
? I assume you have the runtimes
node in it?
Sure
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
}
},
"frameworks": {
"netcoreapp1.0": {}
},
"runtimes": {
"win7-x86": {},
"win7-x64": {}
}
}
@AndriySvyryd thanks, that looks good. What about if you run them one after another, that is, if you run them with one -r
per invocation? Does it all work then?
@blackdwarf Yes, it works fine one-by-one
@blackdwarf I'm going to put this in the backlog or the moment. multi-rid behaviors don't exist in the product to date. If we decide to pursue that, we'll need to take a wholesale look across the verbs.
Now, is this enhancement available? I strongly advise we to implement this feature, thank you !!! :)
as temporary solution, I've created custom targets that allow doing this in one invocation: https://gist.github.com/dasMulli/b14026437468ce4b56ef93e010f24a36 (drop the file in your project / solution directory or add the contents to the project).
Can be used by calling dotnet msbuild /m /t:PublishAll /p:Configuration=Release
@dasMulli
Oh !!! It‘s works, thank you. :)
I saw your post on stackoverflow
before.
I implemented the publish using the bash script.
Publish.sh
Do we have any progress in this? It seems a bit cumbersome to publish each time for different RID?
Thanks, YV
No progress and it is currently in our backlog, which means we will not get to it by our next release. Please try @dasMulli 's workaround.
Bit sad that 3 years later this still isn't something that can be done easily from the command-line....
Well... add another 3 years...
What a pity. I'd like to have the possibility to build for multiple platforms at once. For now, running with a single -r
one by one results in dotnet restore
and dotnet build
for each platform. Would be way better to have this process optimized somehow. Even when I call dotnet restore
and then dotnet publish --no-restore -r <rid>
it ends with an error.
Steps to reproduce
Run
dotnet publish -r win7-x86 -r win7-x64
Expected behavior
Publish to run for each of the specified RIDs
Actual behavior
dotnet : Unexpected value 'win7-x64' for option 'runtime'
Environment data
dotnet --info
output: