Folks,
Am trying to run a build using the below command line however there is a prompt everytime which is causing trouble. I have to address this manually and cannot run automated builds.
$currentScriptPath = (pwd).Path
$solution = "$($currentScriptPath)\foobar_Msi.sln"
$project = "$($currentScriptPath)\foobarSetup\foobarSetup.vdproj"
$BuildLog = "$($currentScriptPath)\buildlog.txt"
$devEnvCom = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
$devEnvExe = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"
$PackagePath = "$($currentScriptPath)\ReleasePackage"
.
.
.
& $devEnvCom $solution /project $project /Build release /Out $BuildLog
An error occured when applying the IIS Express settings to server URL
'http://localhost:2943/' for project 'Foobar.UI'. You may have to
manually edit the applicationHost.config file and make the changes for
your site to run correctly
I cleared IISAppsettings in document, tried non-interactive command line arguments, changed the binding in build servers applicationHost.Config file and nothing works.
On your development machine, copy/move the solution to a local path that exactly matches the one it will be in when the automated build is run. Open the solution in Visual Studio 2012, Save All, and add the hidden [solution path].VS\applicationHost.config to source control.
Related
I am trying to build a new IOS release and get the following error:
"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.After.targets(80,3): error : There was an error unzipping the file bin\iPhone\AppStore\AppBundle\MyApp.zip: Extracting Zip entry would have resulted in a file outside the specified destination directory."
The output line that generates this error is:-
"/usr/bin/zip -r /Users/fred/Library/Caches/Xamarin/mtbs/builds/MyApp/ca830d1e9af62a1e18d114cf402fd82be9cb814135209657390ffb486f0d0ee4/bin/iPhone/AppStore/AppBundle/MyApp.zip ../MyApp.app"
It appears that rather than going back to the parent directory and then zipping the "MyApp.app" directory, the process is creating a zip file with ".." as the root directory with "MyApp.app" as a sub directory, which explains the above error.
I can deploy a debug build to a device, but I cannot build an AppStore release or do an Archive process. My project previously built fine using Visual Studio 2019, but I had to upgrade to get a certificate fix that was only corrected in Visual Studio 2022.
Is there any known fixes for this issue?
I'm using:
Visual Studio v17.3.1
Xamarin v5.0.0.2515
Windows 11 machine
Compiling against;
macOS Monterey v12.5.1
Xcode v13.4.1
Comment out or delete this 'Unzip' task
<!--Unzip App Bundle on Windows-->
<Unzip Condition="Exists('$(DeviceSpecificOutputPath)AppBundle\$(_AppBundleName).zip')" ZipFilePath="$(DeviceSpecificOutputPath)AppBundle\$(_AppBundleName).zip" ExtractionPath="$(DeviceSpecificOutputPath)AppBundle\$(_AppBundleName)$(AppBundleExtension)" />
in the file
..\Community\Msbuild\Xamarin\iOS\Xamarin.iOS.Common.After.targets
Same issue here. Opened MS dev com "Xamarin iOS deployment no longer works".
I did find something that works for me. Select to Archive iOS build and wait for error. Select View Archive + failing iOS build, tap Distribute, cancel the creds challenge, tap Open Folder, and submit the ipa to Apple.
I have a simple wpf/console app build that I want to deploy and be able to update where ever it is installed. So I picked clickonce, from ms, because that seamed to fit my needs.
I can build, deploy, install and update it manually quite fine ;-) but when I move to do the same steps on my teamcity build server, i ran into trouble.
I have a very simpel pipeline.
build the app (works fine)
make the setup.exe, to be installed.. <= trouble !!
copy to an ISS hosted website.
ad 1) my build:
ad 2) my make click once....
If I run through step 2 manually in visual studio on the buildserver, it works. I get the binaries published in a folder. That I can copy to the IIS folder. but nothing is produced with TeamCity !!!
what am I doing wrong?
(the trace looks like there are no files, to work with. they are gone somehow...)
8x--------
lines pasted in from teamcity log
in directory: C:\TeamCity\BuildAgent1\work\4c50753a43ea36fe
17:14:49 Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET
17:14:49 Copyright (C) Microsoft Corporation. All rights reserved.
17:14:49
17:14:50 Build started 27/01/2022 17.14.50.
17:14:50 0>Process = "C:\Program Files\dotnet\dotnet.exe"
17:14:50 MSBuild executable path = "C:\Program Files\dotnet\sdk\5.0.404\MSBuild.dll"
17:14:50 Command line arguments = ""C:\Program Files\dotnet\sdk\5.0.404\MSBuild.dll" -maxcpucount -verbosity:m -target:Publish -property:TargetFramework=net5.0 -property:Configuration=Release -property:VersionSuffix=187 -property:NoBuild=true C:\TeamCity\BuildAgent1\work\4c50753a43ea36fe\TeamCityNugetTest.sln #C:\TeamCity\BuildAgent1\temp\agentTmp\2.rsp"
17:14:50 Current directory = "C:\TeamCity\BuildAgent1\work\4c50753a43ea36fe"
17:14:50 MSBuild version = "16.11.2+f32259642"
17:14:50 Project "TeamCityNugetTest.sln": Publish
I would suggest you define your output directory to a location outside of:
C:\TeamCity\BuildAgent1\work\4c50753a43ea36fe
I assume TeamCity is trying to put the outputs in \bin, as happens on a normal build/publish, unless you specify the output elsewhere. And if your repository doesn't contain \bin, it won't have an actual place to put it when it's done.
Also, you could probably just do the second build step. I believe dotnet publish will build the project/solution anyway.
Below is the error when we run dotnet cli commands such as "dotnet build" or "dotnet run" in the terminal.
error MSB4019: The imported project was
not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\5.0.203\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
It is something to do with VSTool path of .csproj file but not able to figure out where is the fix. Looking for your inputs. Thanks in Advance.
The $(VSToolsPath) is like: $(Tool Installation Directory) + "\Microsoft\VisualStudio\v16.0\".
And the "WebApplications\Microsoft.WebApplication.targets" file is from msbuild tool.
You should use msbuild.exe instead of dotnet.exe to do build.
A task of my Azure DevOps build fails to find my solution path when I change from "Hosted" Agent to "Hosted VS2017".
Does the folder organisation change from a agent to another ?
My C# solution used to run with .NET framework 4.6, and I reference now 4.7.1 version. That's why I need apparently to use "Hosted VS2017" agent instead of the default "Hosted" agent.
But a task that uses a gulpfile fails when trying to build my solution. I tried to execute the build with diagnostics, but I got no more informations than "The system cannot find the path specified." in my first MSbuild command.
---
[command]C:\npm\prefix\gulp.cmd CI-default --gulpfile D:\a\1\s\source\back-end\gulpfile.js
[15:41:53] Using gulpfile D:\a\1\s\source\back-end\gulpfile.js
[15:41:53] Starting 'CI-default'...
[15:41:53] Starting 'Publish-All-Projects'...
[15:41:53] Starting 'Build-Solution'...
[15:41:53] Using automatic maxcpucount
The system cannot find the path specified.
[15:41:53] { Error: Command failed: "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\a\1\s\source\back-end\******.sln" "/target:Build" /verbosity:minimal /toolsversion:14.0 /nologo /maxcpucount /property:Configuration="Release"
The system cannot find the path specified.
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:189:13)
at maybeClose (internal/child_process.js:970:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
killed: false,
code: 1,
signal: null,
cmd:
'"C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe" "D:\\a\\1\\s\\source\\back-end\\ALE.sln" "/target:Build" /verbosity:minimal /toolsversion:14.0 /nologo /maxcpucount /property:Configuration="Release"' }
---
The build fails at this steps but should execute properly (it does actually when I do it with the default "Hosted" agent or on my local machine with Visual Studio)
Why is my MSbuild command path not reachable if I change my Azure DevOps agent?
That because the Visual Studio 2015 is installed by default on the "Hosted" Agent, and Hosted VS2017 with Visual Studio 2017 by default.
However, the path for the MSBuild 14.0 and 15.0 are different.
The default path for MSBuild 14.0 is C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe.
But the default pathfor the MSBuild 15.0, the path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe.
So to resolve this issue, you should change the MSBuild in your CMD scripts:
cmd:
'"C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe"
To
cmd:
C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\MSBuild\\15.0\Bin\\MSBuild.exe
Hope this helps.
My co-worker is able to deploy our projects to AWS Elastic beanstalk fine. However I have issues on both my work machine and my home laptop. Both computers have the same error in AWS window pane.
I get a pop up as follows:
Deployment of the website failed due to errors during build of the deployment archive,
check visual studio output window 'Build' and/ or 'Amazon Web Service' panes for more details.
Then in the amazon window pane I get a different error everytime I try to run the deployment.
Example 1:
...package build 'CopyPipelineFiles': error in 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets' at (1413,5): Copying file Web.config to obj\AmazonDev\TransformWebConfig\original\Web.config failed. Could not find file 'Web.config'.
Example 2:
...package build 'TransformXml': error in 'C:\Users\Andrew\colony\colony-website\Colony.Web\Colony.Web.csproj' at (840,5): Could not open Transform file: Could not find file 'C:\Users\Andrew\colony\colony-website\Colony.Model\Web.AmazonDev.config'.
Seems to be a different error each time -- I'm not sure how to even begin to look for any issues.
Jim Flangagan's comment is the answer: ReSharper 8.2 is causing this problem. To resolve either disable resharper ( Tools>Options>ReSharper>General>Suspend Now) or upgrade Resharper.