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

Discussion in 'ASP .Net' started by rockdale, Nov 3, 2006.

  1. rockdale

    rockdale Guest

    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
     
    rockdale, Nov 3, 2006
    #1
    1. Advertising

  2. 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




    "rockdale" <> wrote in message
    news:...
    > 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
    >
     
    George Ter-Saakov, Nov 3, 2006
    #2
    1. Advertising

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

    -- bruce (sqlwork.com)

    "George Ter-Saakov" <> wrote in message
    news:ehkzB11$...
    > 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
    >
    >
    >
    >
    > "rockdale" <> wrote in message
    > news:...
    >> 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
    >>

    >
    >
     
    bruce barker \(sqlwork.com\), Nov 3, 2006
    #3
  4. rockdale

    rockdale Guest

    thanks. it works.

    -rockdale
    George Ter-Saakov wrote:
    > 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
    >
    >
    >
    >
    > "rockdale" <> wrote in message
    > news:...
    > > 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
    > >
     
    rockdale, Nov 3, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeronimo Bertran

    Compiling a code behind file as unsafe

    Jeronimo Bertran, Nov 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    438
    Jacob Yang [MSFT]
    Nov 19, 2003
  2. ad
    Replies:
    5
    Views:
    1,622
  3. rockdale
    Replies:
    1
    Views:
    696
    Juan T. Llibre
    Aug 23, 2006
  4. Replies:
    1
    Views:
    501
  5. Replies:
    1
    Views:
    587
    bruce barker
    Oct 17, 2007
Loading...

Share This Page