Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4604342
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:16:54+00:00 2026-05-22T00:16:54+00:00

I want to deploy my ASP.NET MVC site and have the following script. <?xml

  • 0

I want to deploy my ASP.NET MVC site and have the following script.

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\MyProjName\MyProjName.csproj"/>
  <PropertyGroup>
    <NewInstallDir>C:\DeployFolder\</NewInstallDir>
    <BinDir>$(NewInstallDir)bin\</BinDir>
  </PropertyGroup>
  <Target Name="Build">
    <MSBuild Projects="..\MySlnName.sln"
        Properties="Configuration=Release;Platform=Any CPU;OutputPath=$(BinDir)" />
    <Copy SourceFiles="@(Content->'..\MyProjName\%(RelativeDir)%(FileName)%(Extension)')"
        DestinationFiles="@(Content->'$(NewInstallDir)%(RelativeDir)%(FileName)%(Extension)')" />
    <Copy SourceFiles="@(None->'..\MyProjName\%(RelativeDir)%(FileName)%(Extension)')"
        DestinationFiles="@(None->'$(NewInstallDir)%(RelativeDir)%(FileName)%(Extension)')" />
    <MakeDir Directories="@(Folder->'$(NewInstallDir)%(RelativeDir)')" />
  </Target>
</Project>

Main idea.

I copied binary to C:\DeployFolder (take structure of folder from sources). I build my dll to C:\DeployFolder\Bin (I don’t have this folder in sources folder so I need separately copy this).

I run my script – all works instead of copy DLLs to OutputPath. Same scripts works for other asp.net mvc project. I have no idea what is wrong in this case.

I complete this issue with workaround but I would like to know what is wrong with this script.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:16:55+00:00Added an answer on May 22, 2026 at 12:16 am

    The first thing I’d try is to replace your use of the deprecated $(OutputPath) with $(OutDir). From when I’ve seen this error, 9 times out of 10 it is due to a mismatch between the Platform/Configuration requested and how a particular project is actually defined. Take care to keep track of the discrepency between “Any CPU” (with a space) preferred by solution files and “AnyCPU” actually used inside project files for $(Platform). Some project wizards only set up an “x86” Platform or otherwise omit “AnyCPU” which can cause the OutputPath to be empty.

    Beyond that, the approach of importing a project file and then building a solution (presumbably that includes the very same project” is a bit off center. Consider making the deployment changes you desire within the project file itself, through an import. You can either wire into the existing build targets at the right place, or perhaps add an additional target.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net MVC App that I want to deploy to IIS 5
I have an Visual Studio 2010 ASP.Net project. And I want to deploy this
If I want to deploy my asp.net mvc application in iis (any version it
I want to be able to deploy a new version of my asp.net/mvc website
I have ASP.NET project and attached mdf database.I want to deploy it to remote
I have an ASP.NET MVC 2 application. Web project contains a reference to SomeProject
I want to use ELMAH with sql server on my ASP.net MVC 3 project,
I want to deploy my ASP.NET application. Its not a web site it's a
I have an ASP.NET MVC web site with a database of songs. I'd like
I have been working on a small project on recent delived ASP.NET MVC 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.