简体   繁体   中英

Trying to publish an azure webjob from visual studio 2013 update 4

I've been trying to get a very simple Azure webjob deployed from visual studio 2013. I've written the job it just outputs some stuff to the console and now I'm trying to deploy it.

I clicked "Deploy As Azure Webjob" and got an error saying that the deploy target couldn't be found so after a bit of digging (on this site) I installed MSBuild.Microsoft.VisualStudio.Web.Targets from nuget and included that in my csproj.

Unfortunately I still get an error and I'm just not sure how to config the error out as I am sure thats all it needs.

The error is:

Error MSB4044: The "GetDeployManagedRuntimeVersion" task was not given a value for the required parameter "TargetFrameworkVersion".

I know what that means but am not entirely sure how to fix in this instance.

I recently encountered this issue as well. This solution worked for me. Add the DeployDefaultTargetFrameworkVersion property to your project file:

<PropertyGroup>
    <!-- ... Other props ... -->
    <DeployDefaultTargetFrameworkVersion>4.5</DeployDefaultTargetFrameworkVersion>
</PropertyGroup>

I got this answer from: http://derprecated.com/?p=54

Edit: The site is down now, but here is a cached version of the page for those who are curious: https://web.archive.org/web/20150813001117/http://derprecated.com/?p=54

In case you got the same error trying to publish .net Core app:

Ensure "Microsoft.Web.WebJobs.Publish 2.x" is not installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM