【发布时间】:2022-10-25 17:02:48
【问题描述】:
我们有一个旧的 Silverlight 项目,我们必须在开发现代替代品时对其进行维护。 对于构建和发布,我们使用 Azure DevOps。 在 Windows 2019 和 2022 保留在 Azure DevOps 的可用映像中之后,问题就出现了。使用 Silverlight 项目停止构建的 VS 版本。 Visual Studio 企业版 2019 16.11.32901.82 Visual Studio 企业版 2022 17.3.32901.215
2022-09-10T14:26:05.9397408Z ##[error]abcWebSilverlight\abcWebSilverlight.csproj(1056,11): Error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets" was not found. Also, tried to find "Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath32) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
现在,为了解决建筑物的问题,我看到了两种可能的方法:
-
不知何故安装必要的VS版本。 我已经在互联网上搜索了所有内容,但找不到如何做到这一点。 在构建任务中,我设置了所需的版本,并且构建跳转到工作室的可用版本,因为系统中没有安装其他版本。
-
肮脏的黑客。尝试以某种方式安装扩展程序https://marketplace.visualstudio.com/items?itemName=RamiAbughazaleh.SilverlightProjectSystem&ssr=false#qna,希望该项目能够正常工作。 但话又说回来,在 Azure DevOps 中,我没有看到允许我执行此操作的工具。
对于我的问题的可能解决方案,我将不胜感激。 谢谢你。
【问题讨论】:
标签: silverlight azure-devops azure-pipelines