C
C#6mo ago
DrTosh

Help! XmlnsDefinitions in Project-File

Hello can someone help me? I have a wpf library with some xaml components and such. Now i want to combine the namespaces of these controls into one url. I know that i can put these defintions into an assemblyinfo file but i wondered if it is still necessary to generate one, because it was removed in the lately versions of .Net (im using .Net 7). So i asked chatgpt and it said i just put the following files into the csproj, but i dont get it to work and also dont find a similiar example in the web. Im always very sceptical what chatgpt generates but i thought i ask u guys if anyone knows if this is valid and possible?
<ItemGroup>
<XmlnsPrefix Include="http://abc.com/">
<Prefix>abc</Prefix>
</XmlnsPrefix>
</ItemGroup>

<ItemGroup>
<XmlnsDefinition Include="http://abc.com/">
<Namespace>A.B.C</Namespace>
</XmlnsDefinition>
<XmlnsDefinition Include="http://abc.com/">
<Namespace>A.B.C.D</Namespace>
</XmlnsDefinition>
<XmlnsDefinition Include="http://abc.com/">
<Namespace>A.B.C.E</Namespace>
</XmlnsDefinition>
</ItemGroup>
<ItemGroup>
<XmlnsPrefix Include="http://abc.com/">
<Prefix>abc</Prefix>
</XmlnsPrefix>
</ItemGroup>

<ItemGroup>
<XmlnsDefinition Include="http://abc.com/">
<Namespace>A.B.C</Namespace>
</XmlnsDefinition>
<XmlnsDefinition Include="http://abc.com/">
<Namespace>A.B.C.D</Namespace>
</XmlnsDefinition>
<XmlnsDefinition Include="http://abc.com/">
<Namespace>A.B.C.E</Namespace>
</XmlnsDefinition>
</ItemGroup>
0 Replies
No replies yetBe the first to reply to this messageJoin