MsDeploy could not create folder in bin directory - treats as file, according to log - msdeploy

I am trying to deploy simple zip archive to webroot of an application with following file only:
bin/Views/Test.cshtml
using following MsDeploy command
C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -allowUntrusted="True" -verb:sync -source:package="package.zip" -dest:contentPath="test",includeAcls="False" -skip:objectName=dbFullSql -skip:objectName=dbDacFx -enableRule:DoNotDelete -enableRule:IgnoreFileLastWriteTime
But it fails with following error
Info: Adding file (test\bin\Views\).
Error: An error was encountered when processing operation 'Create File' on 'C:\inetpub\test\bin\Views\'.
Error: The error code was 0x8007007B.
Error: The path 'C:\inetpub\test\bin\Views\' is not valid.
Error count: 1.
Basing on error, I could suppose that MsDeploy somehow treats Views folder as file. How could I fix this?

Turns out that problem was in the way, how archive was created.
I used following Powershell command:
Compress-Archive -Path $Src -DestinationPath $Dest -CompressionLevel Optimal -Force -Verbose -ErrorAction Stop
This was wrong, as it packed folders as files.
To fix this, I used following command:
Add-Type -Assembly "System.IO.Compression.FileSystem" ;
[System.IO.Compression.ZipFile]::CreateFromDirectory("$Src","$Dest")
And deployment started working

Related

Symbolicate command not found when fully symbolicate the crash report in Xamarin iOS

I get this error when I submit App to AppStore:
I searched the net and found this article: https://jmillerdev.com/symbolicating-ios-crash-files-xamarin-ios/
I tried to follow the step-by-step instructions as follows:
I downloaded the crashlog.txt files and changed the extension to .crash, moved it to the folder CrashTop
I found the .app file by changing MyApp.ipa to MyApp.zip and extracting it. It's in the folder PayLoad. I copied the file MyApp.iOS to the folder CrashTop
In Xcode/Window/Organizer. Archives Show in Finder opens showing the package contents. I found the dSYMs folder and copied the .dSYM file to the folder CrashTop
Next i Open Terminal and run this command:
alias symbolicate="/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash -v"
and
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
Run Symbolicate
Open Terminal again and cd to the directory folder CrashTop and run the command
symbolicate -o "symbolicatedCrash.txt" "crashlog-DCE8F822-47EB-42F9-A737-5D137FD827FE.crash" "MyApp.iOS.app"
But what I get back is: command not found: symbolicate
It's been 10 days. I've tried searching all over the internet. But it doesn't solve the problem. I also used Microsoft.AppCenter.Crashes to catch the error. However, it shows no errors. On xcode (13.3.1) simulator it works fine.
Please solution to solve this problem.
Ask for any help from everyone.
Update
Copy all files to CrashTop folder.
Run command:
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
and
./symbolicatecrash -v crashlog-DCE8F822-47EB-42F9-A737-5D137FD827FE.crash MyApp.iOS.app.dSYM
-> I get the error: zsh: no such file or directory: ./symbolicatecrash
Do not set alias .
You can copy symbolicatecrash file and paste it to the CrashTop folder .
and run the command
./symbolicatecrash -v MyApp-Crash-log.crash MyApp.dSYM

error ASPPARSE: Could not load type error with msbuild on teamcity

I'm receiving error ASPPARSE: Could not load type error when building a project on team city.
The file it is failing on is a folder which is not referenced in the project but is just there for source control.
C:\TC\Agents\3\work\fd3ea8938fa12582>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler -v /DummyDeployWeb -p C:\TC\Agents\3\work\fd3ea8938fa12582\Project C:\TC\Agents\3\work\fd3ea8938fa12582\PreCompiled\Project-fixednames -u
ERROR
/DummyDeployWeb/common/files/somefilename.ascx(1): error ASPPARSE: Could not load type 'Project.somefilename'
How can I get the project to build and ignore these folders that arent referenced?
The ASP.NET compiler knows nothing about project files, it simply processes the entire contents of the folder you point it at.
There is no way to tell the compiler to exclude specific files and so if this is a requirement for you then one solution would be to move these files out of the folder before you run the compiler and then copy them into the deployment folder after the compilation is complete.

aspnet_compiler incremental precompile

I have a website project and I want to make aspnet_compiler precompile incrementally (right now it cleans out everything and recompile everything from scratch)
I tried to delete the -f flag, and use fixednames, but then it gave me this error error ASPRUNTIME: The target directory is not empty.
am I suppose to delete the target directory after each instance of precompiling?

Clean Yeoman install results in a Grunt error

I am running grunt server after a clean install of Yeoman, using the Webapp generator and I get the following error:
Warning: Errno::ENOENT on line 441 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb: No such file or directory - /Users/nfento/Sites/test/app/bower_components
Run with --trace to see the full backtrace Use --force to continue.
Any idea what would be causing this? I have been able to reproduce the error on two machines. I'm completely new to using grunt, but have used it as a server with livereload previously.
Maybe is a bit late but:
check if you have a app/bower_components folder
if not check if there is a bower_components folder in the root
if it exists move it in the /app folder
create a file .bowerrcand paste this in:
{"directory": "app/bower_components"}

PHPUnit's TextUI/command.php not found

I installed phpunit for my symfony2 project following this:
How to use phpunit installed from composer?
But I get the following error now:
Warning: include(C:\Program Files (x86)\Zend\Apache2\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php): failed to open stream: No such file or directory in C:\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\composer\ClassLoader.php on line 150
The file does exist and is in the autoload_classmap file, so I'm unsure why I receive this error when I run vendor/bin/phpunit -c app
You only should fix your basePath issue:
instead of this:
C:\Program Files (x86)\Zend\Apache2\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php
it should be this :
C:\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php
You should go and read in line 150 of composer\ClassLoader.php and if possible add some echo or var_dump to debug and see the content of the variables used there that point to a wrong path.
Program Files (x86)\Zend\Apache2\
show up twice in the include error but not the open stream error.
open stream: No such file or directory in C:\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\composer\ClassLoader.php on line 150

Resources