Thanks for the tip, Jon, but it doesn't like those characters.
error MSB4025: The project file could not be loaded. Invalid syntax for a decimal numeric entity
reference.
I thought the escape character for an MSBuild file was '%', that's why I tried it. It output a hex
16 character for the sequence %169.
Flomo
--
[quoted text, click to view] Jon Skeet [C# MVP] wrote:
> Flomo Togba Kwele <Flomo@community.nospam> wrote:
> > Is there a way to create a copyright symbol as output?
> > I've tried and haven't been able to.
> >
> >
> > <AssemblyInfo CodeLanguage="VB"
> > OutputFile=".\AssemblyInfo.vb"
> > AssemblyTitle="App"
> > AssemblyDescription="App Description"
> > AssemblyCompany="Company Name"
> > AssemblyProduct="App"
> > AssemblyCopyright="Copyright %169 Company Name 2007"
> > ...
> > />
>
> If it's in an XML file, you need an XML escape:
>
> AssemblyCopyright="Copyright © Company Name 2007"
>
> I haven't tried that, but I'd expect it to work.
>
> (Point of quibbling - there's no ASCII copyright symbol. ASCII doesn't
Yes, I did.
AssemblyCopyright="Copyright © Company Name 2007"
error MSB4025: The project file could not be loaded. Invalid character in the given encoding.
--
[quoted text, click to view] Jon Skeet [C# MVP] wrote:
> Flomo Togba Kwele <Flomo@community.nospam> wrote:
> > Thanks for the tip, Jon, but it doesn't like those characters.
> >
> > error MSB4025: The project file could not be loaded. Invalid syntax
> > for a decimal numeric entity reference.
>
> Hmm. Odd.
>
> > I thought the escape character for an MSBuild file was '%', that's
> > why I tried it. It output a hex
> > 16 character for the sequence %169.
>
> Well, the version I gave was just the generic way of doing it in XML -
> not MS Build specific.
>
> Have you tried just inserting the copyright sign directly into the file
Yes, it was already there.
<?xml version="1.0" encoding="utf-8"?>
However, the MSBuild file itself was encoded ANSI, not UTF-8. When I changed it and re-ran the
script, no error!
Thanks so much, Jon.
--
[quoted text, click to view] Jon Skeet [C# MVP] wrote:
> Flomo Togba Kwele <Flomo@community.nospam> wrote:
> > Yes, I did.
> >
> > AssemblyCopyright="Copyright © Company Name 2007"
> >
> > error MSB4025: The project file could not be loaded. Invalid
> > character in the given encoding.
>
> Did you specify the encoding at the start of the file, and are you sure
[quoted text, click to view] Flomo Togba Kwele <Flomo@community.nospam> wrote:
> Is there a way to create a copyright symbol as output?
> I've tried and haven't been able to.
>
>
> <AssemblyInfo CodeLanguage="VB"
> OutputFile=".\AssemblyInfo.vb"
> AssemblyTitle="App"
> AssemblyDescription="App Description"
> AssemblyCompany="Company Name"
> AssemblyProduct="App"
> AssemblyCopyright="Copyright %169 Company Name 2007"
> ...
> />
If it's in an XML file, you need an XML escape:
AssemblyCopyright="Copyright © Company Name 2007"
I haven't tried that, but I'd expect it to work.
(Point of quibbling - there's no ASCII copyright symbol. ASCII doesn't
include any characters of Unicode > 127.)
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
[quoted text, click to view] Flomo Togba Kwele <Flomo@community.nospam> wrote:
> Thanks for the tip, Jon, but it doesn't like those characters.
>
> error MSB4025: The project file could not be loaded. Invalid syntax
> for a decimal numeric entity reference.
Hmm. Odd.
[quoted text, click to view] > I thought the escape character for an MSBuild file was '%', that's
> why I tried it. It output a hex
> 16 character for the sequence %169.
Well, the version I gave was just the generic way of doing it in XML -
not MS Build specific.
Have you tried just inserting the copyright sign directly into the file
and saving it in UTF-8?
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
[quoted text, click to view] Flomo Togba Kwele <Flomo@community.nospam> wrote:
> Yes, I did.
>=20
> AssemblyCopyright=3D"Copyright =A9 Company Name 2007"
>=20
> error MSB4025: The project file could not be loaded. Invalid
> character in the given encoding.
Did you specify the encoding at the start of the file, and are you sure=20
you saved it *using* that encoding?
--=20
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
[quoted text, click to view] Flomo Togba Kwele <Flomo@community.nospam> wrote:
> Yes, it was already there.
> <?xml version="1.0" encoding="utf-8"?>
>
> However, the MSBuild file itself was encoded ANSI, not UTF-8. When I
> changed it and re-ran the script, no error!
>
> Thanks so much, Jon.
No problem. I'm still intrigued as to what's wrong with using the
numeric version though. If I ever get time, I'll have a look - it's
unlikely that I *will* get the time though :(
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
Don't see what you're looking for? Try a search.