visual studio 2005 unsafe code may only appear if compiling with /unsafe

R

rockdale

Hi, all

Could somebody tells me where can I set "Allow unsafe code" in visual
studio 2005. I could not find any Project Properties|Configuration
Properties in my website solution.

Mine appl is a VS 2005 Web Site Projects, should I migrate to VS 2005
Web Application Projects?

Thanks a lot
-rockdale
 
G

George Ter-Saakov

Drop this in web.config
<system.codedom>
<compilers>

<!-- zero or more compiler elements -->

<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/unsafe"
warningLevel="1"/>

</compilers>

</system.codedom>


Must be under <configuration> node

George
 
B

bruce barker \(sqlwork.com\)

also the asp.net configuration on the server needs to set to allow unsafe
code.

-- bruce (sqlwork.com)
 
R

rockdale

thanks. it works.

-rockdale
George said:
Drop this in web.config
<system.codedom>
<compilers>

<!-- zero or more compiler elements -->

<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/unsafe"
warningLevel="1"/>

</compilers>

</system.codedom>


Must be under <configuration> node

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top