Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Unsafe code may only appear if compiling with /unsafe error
WhatsApp
Mahesh Chand
12y
62.9
k
0
2
25
Blog
You get Unsafe code may only appear if compiling with /unsafe error when trying to debug or build unsafe code in Visual Studio.
To fix this error, you need to set your project setting to build and/or debug unsafe code.
To set unsafe build, go to your project in Solution Explorer.
Right click on Project Name and select Properties.
Go to Build tab and select "Allow unsafe code"
To debug unsafe code, go to Debug tab and select "Enable unmanaged code debugging"
Up Next
Error - PerfWatson2.exe Issue While Installing SSIS Projects In VS
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.
Membership not found