AppVeoyr undefined variable
Hi, I have this in the build event as part of our project:
REM Check if the JavaScript projects have been built.
If Not Exist "$(ProjectDir)..\Rock.JavaScript.Obsidian\dist" (
"$(DevEnvDir)..\..\MSBuild\Current\Bin\MSBuild.exe" "$(ProjectDir)..\Rock.JavaScript.Obsidian\Rock.JavaScript.Obsidian.njsproj" -p:Configuration=$(ConfigurationName)
)
However, when building in AppVeyor I get this:
error MSB3073: "*Undefined*..\..\MSBuild\Current\Bin\MSBuild.exe" "C:\projects\rock\Rock\..\Rock.JavaScript.Obsidian\Rock.JavaScript.Obsidian.njsproj" -p:Configuration=Debug [C:\projects\rock\Rock\Rock.csproj]
So it looks like *Undefined* is for the $(ProjectDir) and AppVeyor doesn't pass this variable.
Is there a way to do this? I can't modify the source files so I need to get it working and somehow set ProjectDir. Is there a way to do that in appVeyor? Thanks!
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Jason on 07 Oct, 2022 02:11 PM
On reflection, sorry it's the DevEnvDir that isn't set!
Support Staff 2 Posted by Feodor Fitsner on 07 Oct, 2022 03:43 PM
Sure, you can just define an environment variable with the same name, e.g. in
appveyor.yml
:or you can define the variable on UI.
3 Posted by Jason Linthwait... on 07 Oct, 2022 04:52 PM
Hey Feodor,
Thanks but I don’t know what it should be assigned to. I looked online and it looks like this is set by msbuild and is the project directory for the visual studio installation. Does this get set by appveyor?
Best Regards,
Jason Linthwaite
Systems Architect, Passion City Church
T (Primary): +1 678 431 6967
Certified AWS Solutions Architect
Certified AWS DevOps Professional
Support Staff 4 Posted by Feodor Fitsner on 07 Oct, 2022 05:09 PM
That's interesting. I thought it's something your team added to a project file. I've never dealt with
.njsproj
projects before. What version of VS do you use locally?OK, so a full path to
msbuild.exe
on VS 2019 image isC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
.What if you set
DevEnvDir
toC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current
?Feodor Fitsner closed this discussion on 07 Dec, 2022 09:02 PM.