Comments (7)
This seems caused by the operating-system-dependent behaviour of CmdLine@2 referenced in azure-pipelines.yml. On Windows, it uses CMD, which does not remove quotation marks from the echo command. On Linux, it uses bash, which removes them.
from msbuild.
@KalleOlaviNiemitalo What should I do? Can you give me some advice? Thanks.
from msbuild.
I can think of ways to fix it, but haven't tried these:
- remove the quotation marks from https://github.com/Varorbc/Test/blob/ce49de9996babe7ff0cdc883c5d593fd712f6585/azure-pipelines.yml#L17 but then it'd not work on Linux
- replace CmdLine@2 with Bash@3 or PowerShell@2 if the docker images have these installed
- add a condition to run CmdLine@2 with different parameters depending on the operating system
from msbuild.
This seems caused by the operating-system-dependent behaviour of CmdLine@2 referenced in azure-pipelines.yml. On Windows, it uses CMD, which does not remove quotation marks from the echo command. On Linux, it uses bash, which removes them.
It occurred to me that this was not the case, and if so, the value of Test1
should be empty in windows. Now it is true
in both windows and linux environments, and as expected, there is no problem.
from msbuild.
It occurred to me that this was not the case, and if so, the value of Test1 should be empty in windows.
What? Your Windows build log shows
Restored D:\a\1\s\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj (in 170 ms).
Test1= true" Test2=true
ClassLibrary1 -> D:\a\1\s\ClassLibrary1\ClassLibrary1\bin\Debug\net8.0\ClassLibrary1.dll
Test1= true" Test2=true
where the value of Test1 clearly includes a quotation mark. And the Linux build log has
Restored /home/vsts/work/1/s/ClassLibrary1/ClassLibrary1/ClassLibrary1.csproj (in 116 ms).
Test1= true Test2=false
ClassLibrary1 -> /home/vsts/work/1/s/ClassLibrary1/ClassLibrary1/bin/Debug/net8.0/ClassLibrary1.dll
Test1= true Test2=false
without the quotation mark.
(The space between Test1=
and true
comes from your MSBuild code.)
from msbuild.
My mistake, I ignore it "
What? Your Windows build log shows
Restored D:\a\1\s\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj (in 170 ms). Test1= true" Test2=true ClassLibrary1 -> D:\a\1\s\ClassLibrary1\ClassLibrary1\bin\Debug\net8.0\ClassLibrary1.dll Test1= true" Test2=true
from msbuild.
from msbuild.
Related Issues (20)
- Request to backport getResultOutputFile from 8.0.3xx to 8.0.1xx SDK. HOT 3
- [Bug]: CI/CD pipeline broken after update from 17.9 to 17.10: no Appx packages generated HOT 2
- [Bug]: OOM Exception due to infinite loop in FileMatcher HOT 2
- [Refactoring] Move all Xml*WithLocation to Microsoft.Build.Framework
- [Feature Request]: Reduce the wrapping around SDK Resolver messages when only one resolver is actually invoked HOT 1
- Analyzer for Property read before assigned HOT 2
- [Bug]: Incorrect framework library is used sometimes during build HOT 1
- Q: Verifying NuGet single multi targeting build assets importation HOT 25
- [Bug]: Project file does not exist with LongPaths HOT 4
- [Bug]: Breaking change in serialized BuildResult can lead to errors in result caching with older data HOT 1
- Add documentation for the risks for version incompatibilities between msbuild and a plugin dependencies HOT 8
- MSBuild Threat Modeling
- MSBuild High Level Overview document
- [Bug]: MSBuild reads projects multiple times, resulting in different project contents at different points in the build
- VS Binlog has evaluations that don't include property/item data with MSBUILDLOGIMPORTS HOT 6
- Analyzer for redundant NuGet packages
- [Bug]: No way to load NuGet.Frameworks into Default ALC
- [Kitten] Fix pipeline warnings
- [Feature Request]: Expand BuildCheck editorconfig allowable syntax HOT 2
- [Bug]: VS and MSBuild/dotnet build produce behave differently with Build Dependencies
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 msbuild.