MsBuild command ignoring location in publish profile
up vote
0
down vote
favorite
I have a VS 2012 solution with asp.net mvc c# site and I'm using it's publish profile with msbuild command. On my local machine the files are published to the directory specified in publish profile but on server they go to the project bin directory.
I'm running the following via MSBuild:
C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe C:WebSitesEMS.sln /p:Configuration=Release /p:DeployOnBuild=true /p:VisualStudioVersion=14.0 /p:AllowUntrustedCertificate=true /p:PublishProfile=C:WebSitesEMSMVCPropertiesPublishProfilesEMS_Auto.pubxml
Here's the publish profile:
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<Configuration>Release</Configuration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeFoldersFromDeployment>
Images
</ExcludeFoldersFromDeployment>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:AppsNEW_PUBLISH</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
We are using .NET Framework 4.5; IIS version on my PC is 7.5; Visual studio 12, Premium edition.
Any help is much appreciated.
c# asp.net-mvc-4 msbuild publish
add a comment |
up vote
0
down vote
favorite
I have a VS 2012 solution with asp.net mvc c# site and I'm using it's publish profile with msbuild command. On my local machine the files are published to the directory specified in publish profile but on server they go to the project bin directory.
I'm running the following via MSBuild:
C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe C:WebSitesEMS.sln /p:Configuration=Release /p:DeployOnBuild=true /p:VisualStudioVersion=14.0 /p:AllowUntrustedCertificate=true /p:PublishProfile=C:WebSitesEMSMVCPropertiesPublishProfilesEMS_Auto.pubxml
Here's the publish profile:
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<Configuration>Release</Configuration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeFoldersFromDeployment>
Images
</ExcludeFoldersFromDeployment>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:AppsNEW_PUBLISH</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
We are using .NET Framework 4.5; IIS version on my PC is 7.5; Visual studio 12, Premium edition.
Any help is much appreciated.
c# asp.net-mvc-4 msbuild publish
I think PublishProfile is the name of the profile to publish, not the location. The name of the file of the .pubxmlfile
– R2D2
Nov 20 at 10:50
PublishProfile can be name of the publish profile or you can also provide a full path to a .pubxml file, but problem shouldn't be there since this command is working on my local machine.
– Jelena
Nov 20 at 12:08
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a VS 2012 solution with asp.net mvc c# site and I'm using it's publish profile with msbuild command. On my local machine the files are published to the directory specified in publish profile but on server they go to the project bin directory.
I'm running the following via MSBuild:
C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe C:WebSitesEMS.sln /p:Configuration=Release /p:DeployOnBuild=true /p:VisualStudioVersion=14.0 /p:AllowUntrustedCertificate=true /p:PublishProfile=C:WebSitesEMSMVCPropertiesPublishProfilesEMS_Auto.pubxml
Here's the publish profile:
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<Configuration>Release</Configuration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeFoldersFromDeployment>
Images
</ExcludeFoldersFromDeployment>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:AppsNEW_PUBLISH</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
We are using .NET Framework 4.5; IIS version on my PC is 7.5; Visual studio 12, Premium edition.
Any help is much appreciated.
c# asp.net-mvc-4 msbuild publish
I have a VS 2012 solution with asp.net mvc c# site and I'm using it's publish profile with msbuild command. On my local machine the files are published to the directory specified in publish profile but on server they go to the project bin directory.
I'm running the following via MSBuild:
C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe C:WebSitesEMS.sln /p:Configuration=Release /p:DeployOnBuild=true /p:VisualStudioVersion=14.0 /p:AllowUntrustedCertificate=true /p:PublishProfile=C:WebSitesEMSMVCPropertiesPublishProfilesEMS_Auto.pubxml
Here's the publish profile:
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<Configuration>Release</Configuration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeFoldersFromDeployment>
Images
</ExcludeFoldersFromDeployment>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:AppsNEW_PUBLISH</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
We are using .NET Framework 4.5; IIS version on my PC is 7.5; Visual studio 12, Premium edition.
Any help is much appreciated.
c# asp.net-mvc-4 msbuild publish
c# asp.net-mvc-4 msbuild publish
asked Nov 20 at 10:29
Jelena
113
113
I think PublishProfile is the name of the profile to publish, not the location. The name of the file of the .pubxmlfile
– R2D2
Nov 20 at 10:50
PublishProfile can be name of the publish profile or you can also provide a full path to a .pubxml file, but problem shouldn't be there since this command is working on my local machine.
– Jelena
Nov 20 at 12:08
add a comment |
I think PublishProfile is the name of the profile to publish, not the location. The name of the file of the .pubxmlfile
– R2D2
Nov 20 at 10:50
PublishProfile can be name of the publish profile or you can also provide a full path to a .pubxml file, but problem shouldn't be there since this command is working on my local machine.
– Jelena
Nov 20 at 12:08
I think PublishProfile is the name of the profile to publish, not the location. The name of the file of the .pubxmlfile
– R2D2
Nov 20 at 10:50
I think PublishProfile is the name of the profile to publish, not the location. The name of the file of the .pubxmlfile
– R2D2
Nov 20 at 10:50
PublishProfile can be name of the publish profile or you can also provide a full path to a .pubxml file, but problem shouldn't be there since this command is working on my local machine.
– Jelena
Nov 20 at 12:08
PublishProfile can be name of the publish profile or you can also provide a full path to a .pubxml file, but problem shouldn't be there since this command is working on my local machine.
– Jelena
Nov 20 at 12:08
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I'm not sure if this is an universal solution but I have seen something similar here on site, used it and that solved our problem: since the Visual studio used for editing and deployment in local is ,as I mentioned,VS 2012 or version 11, I have to copy folder Web from local C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web in location on server: C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0 (there was only folder WebApplications) and now it's working fine.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390992%2fmsbuild-command-ignoring-location-in-publish-profile%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I'm not sure if this is an universal solution but I have seen something similar here on site, used it and that solved our problem: since the Visual studio used for editing and deployment in local is ,as I mentioned,VS 2012 or version 11, I have to copy folder Web from local C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web in location on server: C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0 (there was only folder WebApplications) and now it's working fine.
add a comment |
up vote
0
down vote
I'm not sure if this is an universal solution but I have seen something similar here on site, used it and that solved our problem: since the Visual studio used for editing and deployment in local is ,as I mentioned,VS 2012 or version 11, I have to copy folder Web from local C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web in location on server: C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0 (there was only folder WebApplications) and now it's working fine.
add a comment |
up vote
0
down vote
up vote
0
down vote
I'm not sure if this is an universal solution but I have seen something similar here on site, used it and that solved our problem: since the Visual studio used for editing and deployment in local is ,as I mentioned,VS 2012 or version 11, I have to copy folder Web from local C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web in location on server: C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0 (there was only folder WebApplications) and now it's working fine.
I'm not sure if this is an universal solution but I have seen something similar here on site, used it and that solved our problem: since the Visual studio used for editing and deployment in local is ,as I mentioned,VS 2012 or version 11, I have to copy folder Web from local C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web in location on server: C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0 (there was only folder WebApplications) and now it's working fine.
answered Nov 27 at 6:55
Jelena
113
113
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390992%2fmsbuild-command-ignoring-location-in-publish-profile%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think PublishProfile is the name of the profile to publish, not the location. The name of the file of the .pubxmlfile
– R2D2
Nov 20 at 10:50
PublishProfile can be name of the publish profile or you can also provide a full path to a .pubxml file, but problem shouldn't be there since this command is working on my local machine.
– Jelena
Nov 20 at 12:08