Package / Publish error on Azure - azure

I've recently upgraded an Azure Project from Azure SDK 1.6 (Visual Studio 2010) to Azure SDK 2.0 (Visual Studio 2012). The project will build with no errors or warnings on the local machine. I can debug on the local machine, but I cannot package or get a build on the build server. The error I get is:
error MSB4057: The target "PipelineTransformPhase" does not exist in the project.
I've confirmed that the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplications.targets file exists locally and on the build server.
The original project pointed to the \v10.0\ path and I manually changed that to the \v11.0\ path trying to resolve the error with no luck.

I have noticed that when project is not able to access Microsoft.WebApplications.targets file it usually says "The target "PipelineTransformPhase" does not exist in the project."
You need to import Microsoft.WebApplications.targets file into the project. You can do it by adding following line in your project.
<Import Project="C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" />
When importing Microsoft.WebApplication.targets into the project file, make sure you don't set explicit Condition="false". I have seen similar error when Microsoft.WebApplication.targets was imported to the project along with Condition="false".
One more thing to consider when importing Microsoft.WebApplication.targets into project file, always make sure that default variable $(MSBuildExtensionsPath32) is set to "C:\Program Files (x86)\MSBuild\".

Related

Unable to build Compiled Azure Function in VSTS (Error MSB4019)

I have created an Azure Function using the latest build of visual studio 2017 (15.3.1).
This build allows me to do the:
New Project > Azure Function App approach
This produces a .csproj (not a .funproj file) and it's doesn't come bundled with a website or anything. I've tried .Net 4.6 and 4.6.1 as the target framework and neither have worked.
I get the following error in VSTS:
C:\Users\Builder.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.props
(13, 3)
C:\Users\Builder.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.props(13,3):
Error MSB4019: The imported project "C:\Program Files (x86)\Microsoft
Visual
Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\Sdk\Sdk.Props"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
There is no node in my .csproj file so I am not sure where it is getting that from.
I'm using the latest NuGet option in VSTS, I'm using the Latest VS Version option as well.
The build steps are:
Get Sources
NuGet Restore
Build Solution (MSBuild.exe exited with code '1' every time)
Is there any way to build (and then release) compiled .Net functions in VSTS at the minute?
I was able to solve this by swapping the build agent from the "Default" group to the latest, "Hosted VS 2017" group, and that has compiled fine.
Looks like the machine is missing the latest dotnet cli. I'm not too familiar with VSTS build machines, but you'd need to get that on there somehow https://www.microsoft.com/net/download/core

The target "DeleteCurrentDeployment" does not exist in the project.

I had do downgrade to azure sdk 2.2 for a project. And after installing everything I still cannot compile the solution containing a cloud service and I receive error The target "DeleteCurrentDeployment" does not exist in the project. When I click it points to Microsoft.Common.CurrentVersion.targets in C:\Program Files (x86)\MSBuild\12.0\Bin I trying installing and uninstalling again but nothing works..

Windows Store Apps: Visual Studio 2012 The system cannot find the path specified error?

I downloaded a sample Windows Store Apps project from the Dev Center samples site
When I run the project, I receive the following error in the CharmDemoGridApp
The system cannot find the path specified error
there are no more details, I tried to clean and rebuild the project and nothing happens.
what can be the reason of this ?
OK, I found that the reason was a missing referenced dll.
adding it correctly solved the problem

Build project error

I am trying Android Studio. Installed on Windows XP and got the following error
while trying to build a new project. One of the error messages: the SDK directory is not found.
I have tried to change the path to the SDK but cannot find the option in the configuration menu. Any help is welcome
RESOLVE ERROR:
Failed to import new Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Build file 'L:\Documents and Settings\Administrador\AndroidStudioProjects\Prueba3Project\Prueba3\build.gradle' line: 9
A problem occurred evaluating project ':Prueba3'.
A problem occurred evaluating project ':Prueba3'.
The SDK directory 'L:\Documents and Settings\Administrador\Configuración local\Datos de programa\Android\android-studio\sdk' does not exist.
You need to modify the local.properties file in your project.
I had manually point it to the path of my SDK, which for me, on Mac, looked like this:
sdk.dir=/Applications/Android Studio.app/sdk

Azure Emulator - Could not load file or assembly

All.
I've got Azure SDK 1.7 installed.
All the assemblies in the solution are compiled with 'Any CPU' set up. But one of them fails when i start the solution in Azure emulator on my machine.
The error is very strange: "Could not load file or assembly 'XXX' or one of its dependencies. is not a valid Win32 application."
It becomes more complicated to find the reason, cause on the other machine everything works fine. Also I have no error when deploy it to Azure environment.
Tried to start emulator using IIS Express 8 and full IIS. Also tried to enable 32bit apps support when hosted under full IIS. Converted project to use 1.8 SDK.
But with no success.
Here is also some info from Visual Studio General output. Seems, here is the reason for the issue.
Windows Azure Tools: Warning: Unable to delete file fr000001.xml.
Windows Azure Tools: Warning: Unable to delete file fr000002.xml.
Windows Azure Tools: Warning: Unable to delete file fr000001.xml.
Windows Azure Tools: Warning: Unable to delete file fr000002.xml.
Windows Azure Tools: Warning: Unable to delete file fr000001.xml.
Windows Azure Tools: Warning: Unable to delete file fr000002.xml.
Windows Azure Tools: Warning: Unable to delete file fr000001.xml.
Windows Azure Tools: Warning: Unable to delete file fr000002.xml.
Windows Azure Tools: Warning: Unable to delete directory deployment17(397)
Couldn't find the process that can create such behavior. Of course, tried to restart my machine and to remove all the readonly properties from project files.
Will be glad to see any possible solution.
Thanks in advance.
Ok. I've found the source of problem.
When installed RedGate .NET Reflector, it created environment variable with name DEVPATH.
It's value is: "C:\ProgramData\Red Gate.NET Reflector\DevPath"
I've looked through this path and found there obsolete dll for my project. As result, it searched for the reference as it performs with GAC and always found incorrect one.
Removed and everything works.

Resources