Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
201 views
in Technique[技术] by (71.8m points)

visual studio - The "GetMinimumOSVersion" task was not given a value for the required parameter "SdkVersion"

I am trying to run msbuild command line, but, I am getting in the last step of it, the error below (it is in portuguese, but is the same error in the title.

C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildXamariniOSXamarin.Shared.targets(227,3): erro
r MSB4044: A tarefa "GetMinimumOSVersion" n?o recebeu um valor para o parametro obrigatório "SdkVersion". [E:2-PROJETO
S\_ALGORIXProjetosACCORDSOLUTIONAppAlgorixAppAlgorix.iOSAppAlgorix.iOS.csproj]

My msbuild command is:

msbuild AppAlgorix.sln /p:Configuration=AppStore;Platform=iPhone /p:CFBundleVersion=1 /p:CFBundleShortVersionString=2.3.1 /p:ServerAddress={mac ip address} /p:ServerUser={mac user} /p:ServerPassword={mac pwd} /p:BuildIpa=true /p:IpaPackageDir="E:8-IPASACCORD" /t:Clean;Build /p:ArchiveOnBuild=false /p:IsAppDistribution=false /p:CodesignKey="{App ID identifier}" /p:CodesignProvision="{App Provisioning Profile}"

All the {} data are confidential, so I cropped them.

This command was working one day, but I don′t know when, but after some VS 2019 update, the command, stops working.

I have found some articles about it, but I can′t find a way to resolve this problem.

Onw of those articles is this:

https://www.gitmemory.com/issue/xamarin/xamarin-macios/10109/729614745

My VS 2019 is updated in version 16.8.4.

enter image description here

I have here, about 40 apps to build and get the ipa. I was running a dosbat to resolve it, and get those ipas, more quickly. Not having this msbuild command line working, will take me to a big problem, cause I almost every week have some updates in my apps, and build one by one, will not be a great idea.

And one more thing is.. I can build inside VS 2019, without any problem. The problem happens only via msbuild command line.

question from:https://stackoverflow.com/questions/66051101/the-getminimumosversion-task-was-not-given-a-value-for-the-required-parameter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I used the post Visual Studio update (16.8.1) lead to CI build failures to resolve the error.

"This has reared it's head again in Visual Studio 2019 version 16.8.3. Looks like they've moved the problem to: MSBuildXamariniOSXamarin.Messaging.targets I was able to get my builds running again by removing the _SayGoodbye dependency on line 52 for the _DisconnectAfterClean target."

Although I have resolved the error, now I cant generate the ios.ipa package. Now, I get only the file projectName.iOS.exe, instead of projectName.iOS.ipa.

I dont know if this workaround is the final solution for this bug, yet.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...