DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Data
  4. Roslyn CTP 3 Released — Breaking Changes

Roslyn CTP 3 Released — Breaking Changes

Filip Ekberg user avatar by
Filip Ekberg
·
Sep. 17, 12 · Interview
Like (0)
Save
Tweet
Share
3.64K Views

Join the DZone community and get the full member experience.

Join For Free

Microsoft has released yet another CTP version of Roslyn and this doesn’t come as a big surprise. Since the previous CTP (CTP2) does not work very well with Visul Studio 2012. Now with Roslyn CTP3, we have Visual Studio 2012 support! However, this upgrade does come with a price, there are some breaking changes in the third version of the Roslyn CTP.

You can download the latest Roslyn CTP3 here.

This unfortunately breaks some code samples in my book C# Smorgasbord, but not to worry. The changes are pretty easy to figure out and I’ve put together an Errata that covers all the code samples that are affected by the breaking changes.

You can find the Errata here.

If you’re using Visual Studio and you have intellisense enabled, it’s going to be pretty easy to figure out what has changed. Below is a short list of what I’ve found and what is in the Errata.

No longer possible to run Scripts through ScriptEngine directly

To execute a snippet you need to create a session first, like this:

var engine = new ScriptEngine();
var session = engine.CreateSession();
var result = session.Execute("var x = 10; x");

Console.WriteLine(result);

ParseCompilationUnit is removed

You can now use ParseText and ParseFile instead.

The auto generated GetIssue method has changes.

When creating a Code Issue project, the generated file is changed a bit. Instead of GetText() on the token, you now use ToString() and instead of CodeIssue.Severity.Warning you use CodeIssueKind.Warning.

Method AnalyzeStatementDataFlow is renamed

The method AnalyzeStatementDataFlow on SemanticModel has been renamed to AnalyzeDataFlow().

There are probably a lot more changes to Roslyn than the ones listed above.

If you have any questions regarding the code samples in C# Smorgasbord or if you want to chat about Roslyn, leave me a comment or an e-mail. Even though these are breaking changes, it does not ruin the reading expreience of C# Smorgasbord!

code style Snippet (programming) Session (web analytics) IT Data Types Book Download

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Distributed SQL: An Alternative to Database Sharding
  • The Future of Cloud Engineering Evolves
  • Using the PostgreSQL Pager With MariaDB Xpand
  • Spring Cloud: How To Deal With Microservice Configuration (Part 1)

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: