Search Results

Search found 11 results on 1 pages for 'msbuildcommunitytasks'.

Page 1/1 | 1 

  • MSBuild Community Tasks can't see msbuild in cmd

    - by phenevo
    Hi, I have winforms project app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="MyClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </sectionGroup> </configSections> <applicationSettings> <MyClient.Properties.Settings> <setting name="MyClient_MyService_MyService" serializeAs="String"> <value>SomeUniqueKeyWithAGoodName/server/myService.asmx</value> </setting> </MyClient.Properties.Settings> </applicationSettings> </configuration> customized.targets: <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <BuildEnvironment>DEV</BuildEnvironment> </PropertyGroup> <Choose> <When Condition=" '$(BuildEnvironment)' == 'DEV' "> <PropertyGroup> <BaseUrlWebServices>http://tools.productionServer.pl</BaseUrlWebServices> <PublishDir>C:\Documents and Settings\myName\Desktop\Project\TestMsBuild\</PublishDir> </PropertyGroup> </When> <When Condition=" '$(BuildEnvironment)' == 'QA' "> <PropertyGroup> <BaseUrlWebServices>http://tools.testServer.pl</BaseUrlWebServices> <PublishDir>C:\Documents and Settings\myName\Desktop\Project\TestMsBuild2\</PublishDir> </PropertyGroup> </When> </Choose> </Project> and publishQA.bat (this file is in directory of project) @ECHO OFF msbuild /t:Publish /p:Configuration=Release /p:BuildEnvironment=QA /p:ApplicationVersion=1.2.3.5 pause When I'm running this bat I get error in cmd: @@echo is not recognised... When I'm starting project it's ok, but when I'm lauch try to use any method from webservice I got error about wrong URI. Good uri for QA is : http://tools.testServer.pl/server/myService.asmx Any ideas ?

    Read the article

  • How to propertly reference a namespace for Microsoft.Sdc.Tasks.XmlFile.GetValue

    - by æther
    Hi, i want to use MSBuild to insert a custom xml element into web.config. After looking up online, i found such solution: 1) Store element in the .build file in projectextensions <ProjectExtensions> <CustomElement name="CustomElementName"> ... </CustomElement> </ProjectExtensions> 2) Retrieve the element with GetValue <Target name="ModifyConfig"> <XmlFile.GetValue Path="$(MSBuildProjectFullPath)" XPath="Project/ProjectExtensions/CustomElement[@name='CustomElementName']"> <Output TaskParameter="Value" PropertyName="CustomElementProperty"/> </XmlFile.GetValue> </Target> This will not work as i need to reference a namespace the .build project is using for it to find the needed element (checked the .build file with XPath Visualizer). So, i look up for a further solution and come to this: <ItemGroup> <XmlNamespace Include="MSBuild"> <Prefix>msb</Prefix> <Uri>http://schemas.microsoft.com/developer/msbuild/2003</Uri> </XmlNamespace> </ItemGroup> <Target name="ModifyConfig"> <XmlFile.GetValue Path="$(MSBuildProjectFullPath)" Namespaces="$(XmlNamespace)" XPath="/msb:Project/msb:ProjectExtensions/msb:CustomElement[@name='CustomElementName']" > <Output TaskParameter="Value" PropertyName="CustomElementProperty"/> </XmlFile.GetValue> </Target> But for some reason namespace is not recognized - MSBuild reports the following error: C:...\mybuild.build(53,9): error : A task error has occured. C:...\mybuild.build(53,9): error : Message = Namespace prefix 'msb' is not defined. I tried some variations of referencing it differently but none work, and there is not much about propertly referencing those namespaces online also. Can you tell me what am i doing wrong and how to do it propertly?

    Read the article

  • Can XmlMassUpdate be used to delete an attribute?

    - by tlianza
    For example, I have this line: <forms loginUrl="/redirecttosignin.aspx" name="NAME_HERE" requireSSL="false" timeout="60" domain=".blah.com" /> And I want to delete the "name" attribute altogether. I know I can do this to blank it: <forms xmu:key="loginUrl" loginUrl="/redirecttosignin.aspx" name="" /> But, I literally want to get the name attribute out, and leave the other attributes in tact. Couldn't find any examples of that. Thanks!

    Read the article

  • Adding AllowPartiallyTrustedCallers with MSBuild

    - by Ben Rice
    I am using CC.Net with MSBuild tasks to build an application that is composed of a number of solutions and projects. We are using the AssemblyInfo MSBuild Community task to update version info in AssemblyInfo.cs. Unfortunately the AllowPartiallyTrustedCallers attribute doesn't get in and the AssemblyInfo task tells me that the AllowPartiallyTrustedCallers attribute is not supported by the task. Is there any way to add that attribute through MSBuild without having to resort to a custom task that just tacks the line at the end of the file after-the-fact?

    Read the article

  • MSBuild Extension Pack Zip the folders and subfolders

    - by ManojTrek
    I have to Zip my folders and subfolders Using MSbuild, I was looking at the MSBuild Extension pack, and tried this <ItemGroup> <ZipFiles Include="\Test\Web\**\*.*" > <Group>Release</Group> </ZipFiles> </ItemGroup> <MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressFiles="@(ZipFiles)" ZipFileName="$(WorkingDir)%(ZipFiles.Group).zip"/> When I do this it just keep adding all the files to root, instead of adding it into the specific subfolder within the zip file. I am missing something, can anyone help here please.

    Read the article

  • Web Site Performance and Assembly Versioning – Part 2 Versioning Combined Files Using Subversion

    - by capgpilk
    Ok so it took a while to post this second part. Many apologies, we had a big roll out of a new platform at work and many things had to get sidelined. So this is the second part in a short series of website performance and using versioning to help improve it. Minification and Concatination of JavaScript and CSS Files Versioning Combined Files Using Subversion – this post Versioning Combined Files Using Mercurial – published shortly In the previous post we used AjaxMin to shrink js and css files then concatenated them into one file each which had the file name of site-script.combined.min.js and site-style.combined.min.css. These file names are fine, but you can configure IIS 7 to cache these static files and so lower the amount of data transferred between server and client. This is done by editing the response headers in IIS. 1. In IIS7 Manager, choose the directory where these files are located and select HTTP Response Headers. 2. Check the Expire Web Content and set a time period well into the future. 3. When refreshing the web page, the server will respond with HTTP 304 forcing the browser to retrieve the file from its cache. 4. As can be seen in FireBug, the Cache-Control header has a max age of 31536000 seconds which equates to 365 days.   The server will always send this HTTP 304 message unless the file changes forcing it to send new content. To help force this we can change the file name based on the latest build using the SVN revision number in the filename. So we have lowered data transfer on content that hasn’t changed, but forced it to be sent when you have made a change to the css or js files. Now to get the SVN revision number in to the file name. 1. Import the MSBuildCommunityTasks targets which can be dowloaded from here. 1: <Import Project="$(MSBuildExtensionsPath) 2: \MSBuildCommunityTasks 3: \MSBuild.Community.Tasks.Targets" /> 2. Edit the BeforeBuild target to call out to svn and get the latest revision 1: <SvnVersion LocalPath="$(MSBuildProjectDirectory)" 2: ToolPath="$(ProgramFiles)\VisualSVN Server\bin"> 3: <Output TaskParameter="Revision" PropertyName="Revision" /> 4: </SvnVersion> 3. Set it to update the project AssemblyInfo.cs file for the svn revision. 1: <FileUpdate Files="Properties\AssemblyInfo.cs" 2: Regex="(\d+)\.(\d+)\.(\d+)\.(\d+)" 3: ReplacementText="$1.$2.$3.$(Revision)" /> 4. Now edit the AfterBuild target to get the full dll version. You could combine these two steps and just get the version from svn, I am working on one project that updates the AssemblyInfo file and another project that allows manual editing of the file, but needs that version within the file name; so I just combined the two for this post. 1: <MSBuild.ExtensionPack.Framework.Assembly 2: TaskAction="GetInfo" 3: NetAssembly="$(OutputPath)\mydll.dll"> 4: <Output TaskParameter="OutputItems" ItemName="Info" /> 5: </MSBuild.ExtensionPack.Framework.Assembly> 6: <Message Text="Version: %(Info.AssemblyVersion)" 7: Importance="High" /> 5. Use this Info.AssemblyVersion to write out the combined css and js files as described in the last post. 1: <WriteLinestoFile File="Scripts\site-%(Info.AssemblyVersion).combined.min.js" 2: Lines="@(JSLinesSite)" Overwrite="true" />   In the next post I will cover doing the same, but for a Mercurial repository.

    Read the article

  • Making TeamCity integrate the Subversion build number into the assembly version.

    - by Lasse V. Karlsen
    I want to adjust the output from my TeamCity build configuration of my class library so that the produced dll files have the following version number: 3.5.0.x, where x is the subversion revision number that TeamCity has picked up. I've found that I can use the BUILD_NUMBER environment variable to get x, but unfortunately I don't understand what else I need to do. The "tutorials" I find all say "You just add this to the script", but they don't say which script, and "this" is usually referring to the AssemblyInfo task from the MSBuild Community Extensions. Do I need to build a custom MSBuild script somehow to use this? Is the "script" the same as either the solution file or the C# project file? I don't know much about the MSBuild process at all, except that I can pass a solution file directly to MSBuild, but what I need to add to "the script" is XML, and the solution file decidedly does not look like XML. So, can anyone point me to a step-by-step guide on how to make this work? This is what I ended up with: Install the MSBuild Community Tasks Edit the .csproj file of my core class library, and change the bottom so that it reads: <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> <Target Name="BeforeBuild"> <AssemblyInfo Condition=" '$(BUILD_NUMBER)' != '' " CodeLanguage="CS" OutputFile="$(MSBuildProjectDirectory)\..\GlobalInfo.cs" AssemblyVersion="3.5.0.0" AssemblyFileVersion="$(BUILD_NUMBER)" /> </Target> <Target Name="AfterBuild"> Change all my AssemblyInfo.cs files so that they don't specify either AssemblyVersion or AssemblyFileVersion (in retrospect, I'll look into putting AssemblyVersion back) Added a link to the now global GlobalInfo.cs that is located just outside all the project Make sure this file is built once, so that I have a default file in source control This will now update GlobalInfo.cs only if the environment variable BUILD_NUMBER is set, which it is when I build through TeamCity. I opted for keeping AssemblyVersion constant, so that references still work, and only update AssemblyFileVersion, so that I can see which build a dll is from.

    Read the article

  • TeamCity MSBuild 4.0 Help

    - by ChrisKolenko
    Hi guys, I need some help with my MSBuild file i created a while ago. All i want to do is build the solution, publish a project inside the solution and than copy the files to a directory At the moment when i set Teamcity to .net 4 msbuild, msbuild 4.0 tools and for 86 i get an error stating error MSB4067: The element beneath element is unrecognized. <?xml version="1.0" encoding="utf-8" ?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Run"> <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"/> <PropertyGroup> <OutputFolder>$(OutputDir)</OutputFolder> <DeploymentFolder>$(DeploymentDir)</DeploymentFolder> <CompilationDebug /> <CustomErrorsMode /> <ContentEditorsEmail /> <AdministratorsEmail /> </PropertyGroup> <Target Name="Run"> <CallTarget Targets="Compile" /> <CallTarget Targets="Publish" /> <CallTarget Targets="Deploy" /> </Target> <Target Name="Clean"> <ItemGroup> <BinFiles Include="bin\*.*" /> </ItemGroup> <Delete Files="@(BinFiles)" /> </Target> <Target Name="Compile" DependsOnTargets="Clean"> <MSBuild Projects="WebCanvas.ZakisCatering.Website.sln" Properties="Configuration=Release"/> </Target> <Target Name="Publish"> <RemoveDir Directories="$(OutputFolder)" ContinueOnError="true" /> <MSBuild Projects="WebCanvas.ZakisCatering.Website\WebCanvas.ZakisCatering.Website.csproj" Targets="ResolveReferences;_CopyWebApplication" Properties="Configuration=Release;WebProjectOutputDir=$(OutputFolder);OutDir=$(WebProjectOutputDir)\" /> </Target> <Target Name="Deploy"> <RemoveDir Directories="$(DeploymentFolder)" ContinueOnError="true" /> <ItemGroup> <DeploymentFiles Include="$(OutputFolder)\**\*.*" /> </ItemGroup> <Copy SourceFiles="@(DeploymentFiles)" DestinationFolder="$(DeploymentFolder)\%(RecursiveDir)" /> </Target> </Project>

    Read the article

1