Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with replacements #1

Closed
sayedihashimi opened this issue Dec 17, 2014 · 3 comments
Closed

Issues with replacements #1

sayedihashimi opened this issue Dec 17, 2014 · 3 comments

Comments

@sayedihashimi
Copy link

I looked into why your project wasn't building. The issues is lines 6 and 7 _preprocess.xml which contains the following.

    <add key="RootNamespace" value="$companynamespace$.$safeprojectname$"/>
    <add key="AssemblyName" value="$companynamespace$.$safeprojectname$"/>

When the replacements are processed the .csproj file ends up having the following.

<$companynamespace$.$safeprojectname$>$safeprojectname$</$companynamespace$.$safeprojectname$>

You can perform replacements on the .csproj file but it those replacements should not cause the file to be invalid XML or invalid MSBuild.

I don't understand what is the purpose of the two replacements here. I searched through the ConsoleApp project and for both RootNamespace and AssemblyName the only usage was the element in the .csproj file.

@tlogik
Copy link

tlogik commented Dec 17, 2014

ahh of course... it is the value of the RootNameSpace that should be changed, not the tag itself.
That means that for this i only need to remove the *.csproj from the exclude list, because then it will update the root namespace and assembly name.
like this.

<?xml version="1.0" encoding="utf-8" ?>
<Preprocess>
  <TemplateInfo Path="CSharp\Infomedia"/>
  <Replacements Include="*.*" Exclude="*.vstemplate;*.jpg;*.png;*.ico;_preprocess.xml;_project.vstemplate.xml">
    <add key="ConsoleApp" value="NamespacePrefix.$safeprojectname$"/>
  </Replacements>
</Preprocess> 

@LogikBlitz
Copy link
Owner

And i am closing this. Thanks for your help and time @sayedihashimi
Ill write up a guide with my finding at the wiki as you requested on StackOverflow.
Ill also make one for the multiproject guide.

@kingofday
Copy link

can some body help me please?
ligershark/side-waffle#410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants