I am using MVC3 application,and am creating packages through TFS build.it was working fine when i am creating Packages through MSBuild.
Previously Website1 has my application(Website1/Application) in IIS,now i want to relocate my Application under Website2,like(Website2/Application),in the Package/PublishWeb properties.
But my TFS(MSBuild) Build was failed with following error
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
(3847): Web deployment task failed. (Site 'Website2' does not exist.).
do i need to change may Sitename any other place? Please help us to fixing this issue.
My configuration
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DeployOnBuild>true</DeployOnBuild>
<DeployTarget>MsDeployPublish</DeployTarget>
<MSDeployPublishMethod>InProc</MSDeployPublishMethod>
<CreatePackageOnPublish>true</CreatePackageOnPublish>
<MsDeployServiceURL>localhost</MsDeployServiceURL>
<DeployIisAppPath>Analytics/Application</DeployIisAppPath>
</PropertyGroup>
Related
This is my first time when i came across something like this. For the longest time whenever I want to precisely know the type of the project I use the guidance provided in the link below:
How do you tell the Visual Studio project type from an existing Visual Studio project
And it has been working great for me so far. However, I came across a project where there is no mention of the ProjectType. Below is the XML of .csProj file for the reference.
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{87F6C2DE-6074-4E6D-9854-51EC812F7548}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PL.HR.Services.Employee.DAL</RootNamespace>
<AssemblyName>PL.HR.Services.Employee.DAL</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
I am not sure how can this happen
Is it possible without anyone manually removing the type information from .csproj file?
If not, then under what circumstances does it happen in VS?
Is there anything that we can do to prevent this kind of occurances from happening in the future?
Are you just looking at the xml or are you actually using VS provided services to get this information?
is it really a valid .csproj? or is it just something named .csproj so VS opens it? does VS actually open it without errors?
Some types of projects do not use project type guids as xml elements in a project file, like C++ projects, but then those generally don't end with .csproj. Those types of projects may be implemented in other ways, which implement things in IVsHierarchy and IVsAggregatableProject so you need do to it from code, like one of the pages from your linked answer explains.
I've recently upgraded some solution(s) to Visual studio 2013. All went OK apart from one which now generates the:
Symbol for the modules 'name' were not loaded.
...error every time I run it.
When I look in the modules debug window I can see against the dll (It's a web service dll)
Name Path Optimised User Code Symbol Status
dllName.dll Tempoary ASP.Net...etc. Yes No Skipped Loading...
If I look in the \bin I see the dll and it's coresponding .pdb file.
Checking the build menu for the project I can see Debug Info: full.
Cut a long story short everything looks fine to me except that it's not loading any symbols.
Any idea what I'm missing?
Update
It looks like if I run my solution though IIS express the issue goes away. But running though IIS (8) I still have this problem.
After painfully comparing two project files, one that worked and one that didn't I noticed that the proj that worked had:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
**<Optimize>false</Optimize>**
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
Where as my one had
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
**<Optimize>true</Optimize>**
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
By setting the <Optimize> property to false all issues went away.
This answer also seems relevant as the .csproj.user file can be out of sync, I deleted it.
We have a custom TraceListener (inherited from System.Diagnostics.TraceListener) which we use for our ASP.NET web application logging. It's been working great - no issues. Then all the sudden it stopped working in our dev environment (TraceListener.TraceEvent() stopped firing). We are baffled as to why it stopped working. The only changes we really made in code was added more build configurations (Dev, Test, Stage, Prod). Before, it only had Debug and Release.
I notice that when I test locally having built using the Debug configuration, TraceListener.TraceEvent() is fired just fine. When I switch to another build configuration (i.e. Test), then TraceEvent() is never fired anymore. Here's a snippet of my web .csproj file:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;SkipPostSharp</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Dev|AnyCPU'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Test|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;SkipPostSharp</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Stage|AnyCPU'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Prod|AnyCPU'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
I'm not sure why switching build configurations seems to turn off our logging. Can anyone point me in the right direction?
Figured out the issue. My code which called System.Diagnostics.TraceSource.TraceEvent() to broadcast trace events was in another Project. I needed to enable tracing on THAT project via:
<DefineConstants>TRACE</DefineConstants>
I mistakenly assumed that all I needed to focus on was the main target project (i.e. the Web project). It makes sense now - the project/assembly which calls the System.Diagnostics.TraceSource.TraceEvent() must have tracing enabled (via the project properties for the targeted build configuration) to broadcast those traces. Then your trace listeners can hear them. :)
In project file, normally we can see the following for setting the project output path. Now I am wondering if there is a way to set additional output path. i.e., the built binaries will be copied to the additional path as well.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
It would be trivial to add a post-build event to your project/solution configuration, which copies the files from the original build location to your specified new one. Go to your project properties, and under "Build Events" add the following to your post-build event command line:
xcopy /E $(ProjectDir)bin\Release\ [pathToMyDestination]
As an aside, I'm guessing you want to publish your release build to a host. In that case it's worth looking into continuous integration software, which gives you powerful capabilities. We've used several and are currently using Team City (free).
I am writing a fairly simple WPF desktop application and under build\configuration manager, release is not an option. The only available options are Debug, New, and Edit.
Anyone have an idea on why this is?
Related: the control library in the same solution does have release as a build option. It is only missing in the wpf app.
I figured it out.
To fix i copied the propertygroup tag for release build from the xml in the other project to the project that was missing it.
The propertygroup tag thing does fix the problem.
1) Open your project file in notepad.
2) Paste this after the "debug" propertygroup tag:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>