|
Using VS2008, I want to add a project that is dependent on all other projects so that it runs after they are all built so that I can run some msbuild tasks at the end. There no longer seems to be any empty project in the project templates. I guess I could add some C# project and then delete everything but is there not some more elegant way to do this? Some sort of project template designed just to run msbuild tasks? Thanks for any ideas, Dave - Edited byCodeSlinger Tuesday, October 06, 2009 4:48 AMclarify titel
-
| | CodeSlinger Tuesday, October 06, 2009 4:48 AM | Hi Dave, Sorry for the delay. I'm not sure I understood you clearly, if I misunderstood you, please let me know. Based on my understanding, you want to create a project file, like .csproj, .proj, if so, you just need to create a new file and name it with these file extension. If you want to create these file in Visual Studio, when you create a new C# project in Visual Studio, it will produce a project file, you can see this file by right click project node > unload project and then right click project node again > Edit MyProject.csproj. There is no template item to create a .csporj file in Visual Studio, and I think it is not necessary too. Best Regards, Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - Marked As Answer byCodeSlinger Tuesday, October 13, 2009 3:04 AM
-
| | Nancy Shao Monday, October 12, 2009 6:50 AM | Well I got to work what I wanted to do which was to run a command after all the projects built. Basically I creates a command line project and then deleted everything and manually modified the .csproj file. Not especially elegant so any other suggestions on how to best run some msbuild tasks as a separate build step inside of VS2008 would still be appreciated. The project still creates a 3K .dll and .pdb even though there is no code! Still this works... <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{EE6AA6F4-5220-4655-B737-D5CC02F03BFF}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>XPostBuild</RootNamespace> <AssemblyName>XPostBuild</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <StartupObject> </StartupObject> </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> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> --> <!-- The following is why I did this - to run a powershell script! Notice the special syntax for quotes and the ampersand for the command string! --> <Target Name="AfterBuild"> <Exec Command="powershell.exe -noninteractive -nologo -command %22%26 '$(projectDir)CreateCoreZips.ps1' -version $(Configuration) %22" IgnoreExitCode="true"> <Output TaskParameter="ExitCode" PropertyName="ScriptExitCode" /> </Exec> <Warning Condition="$(ScriptExitCode)==2" Text="Warning: The CreateCoreZips.ps1 PowerShell script raised a warning during execution." /> <Error Condition="$(ScriptExitCode)==1" Text="Error: The CreateCoreZips.ps1 PowerShell script raised an error during execution." /> </Target> <ItemGroup> <None Include="CreateCoreZips.ps1" /> </ItemGroup> <ItemGroup> <Folder Include="Properties\" /> </ItemGroup> </Project>
| | CodeSlinger Tuesday, October 06, 2009 5:54 AM | Hi Dave, Sorry for the delay. I'm not sure I understood you clearly, if I misunderstood you, please let me know. Based on my understanding, you want to create a project file, like .csproj, .proj, if so, you just need to create a new file and name it with these file extension. If you want to create these file in Visual Studio, when you create a new C# project in Visual Studio, it will produce a project file, you can see this file by right click project node > unload project and then right click project node again > Edit MyProject.csproj. There is no template item to create a .csporj file in Visual Studio, and I think it is not necessary too. Best Regards, Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - Marked As Answer byCodeSlinger Tuesday, October 13, 2009 3:04 AM
-
| | Nancy Shao Monday, October 12, 2009 6:50 AM | Thanks for that handy trick to edit the project file. I had been doing it externally. I also need to learn how to edit the project file so that I don't end up with the useless .dll and .pdb files as well. I was only suggesting it would be nice to be able to add a blank project like what I think used to be possible rather than adding a C# project and gutting it. In fact it would be really cool if there was a PowerShell project one could add! Thanks, Dave | | CodeSlinger Monday, October 12, 2009 5:59 PM | Hi Dave, Thanks for your suggestion. If you have any suggestion or feedback of our product, I would suggest you post in our Connect Protal Site with link: https://connect.microsoft.com/VisualStudio/Every feedback submitted will be evaluated carefully by our engineers. They will let you know their comments further through that portal. Thanks, Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. | | Nancy Shao Tuesday, October 13, 2009 2:40 AM | Well I think I added a suggestion but I truly hate that Connect site. It makes me use another ID [MushroomHunter] than the one I normally use on MSDN [CodeSlinger] even though I have to signin with my same Live id and then every time I go to look at my profile on Connect it wants me to register all over again and then when I'm done it says that userid is already taken. Truly awful site for whatever reason...Dave
| | CodeSlinger Tuesday, October 13, 2009 3:04 AM | Hi Dave, As far as I know, we can use MSDN id to sign in Connect Site. If you have already signed in MSDN website, it will sign in Connect Site with this id by default. If you want to sign in different id, you can click Log off button at the top and then sign in different id.After you signed in, you can see the suggestions or bugs you posted by entering your Control Panel at the top menu bar. Best Regards, Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. | | Nancy Shao Tuesday, October 13, 2009 4:07 AM | I get signed in under my LIVE id OK but it welcomes me as "MushroomHunter" which is how I had to register when it would not register me as CodeSlinger like I do on the rest of MSDN. And when I click on YOUR PROFILE it wants me to register again even though I have done that at least 3 or 4 times already.
| | CodeSlinger Tuesday, October 13, 2009 4:22 AM |
|