---
title: "\"Visual C# .NET compiler could not be created\" - Possible solution?"
url: "https://osherove.com/blog/2005/6/22/quotvisual-c-net-compiler-could-not-be-createdquot-possible.md"
canonical: "https://osherove.com/blog/2005/6/22/quotvisual-c-net-compiler-could-not-be-createdquot-possible.html"
published: "2005-06-22T08:37:00"
updated: "2005-06-22T08:37:00"
tags: [".Net Original"]
author: "Roy Osherove"
description: "We started getting this weird exception when trying to build some solution manually: \"Project <Name> could not be opened because the Microsoft Visual C# .NET compiler could not be created\" It might be one of these…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# "Visual C\# .NET compiler could not be created" - Possible solution?

By Roy Osherove June 22, 2005 In [.Net Original](https://osherove.com/blog/category/net-original)

**Historical article** · Originally published June 22, 2005; technical details may be outdated.

We started getting this weird exception when trying to build some solution manually:

_"Project <Name> could not be opened because the Microsoft Visual C# .NET compiler could not be created"_

It might be one of [these things here](http://www.google.com/search?hl=en&lr=lang_en&biw=1004&q=%22could+not+be+opened+because+the+Microsoft+Visual+C%23+.NET+compiler+could+not+be+created.%22), but for me it was something different.

**The path of  one of the project files inside the solution was just too long**.

How long? With **System.IO** it seems impossible to access any files or directories if the
total name (.FullName) is longer than 260 characters or else you get a "PathTooLongException".

Of course - VS.NET 2003 was not polite enough to reveal that information to me. No. I had to find out through a mistress - [Resharper](http://www.jetbrains.com/resharper). This wonderful add in popped up with a dialog box explaining there was an error in loading the project data:

_JetBrains.ReSharper.Util.InternalErrorException: An exception has occurred during initialization of a solution component ---> System.IO.PathTooLongException: The path is too long after being fully qualified.  Make sure path is less than 260 characters._

Thanks, JetBrains.

## More in .Net Original

[All posts in .Net Original](https://osherove.com/blog/category/net-original)

- Aug 17, 2005

    ### [Sherpa: Another Code/Layer/Application Generator](https://osherove.com/blog/2005/8/17/sherpa-another-codelayerapplication-generator.html)

- Jul 14, 2005

    ### [\[Audio Interview\] Steve Cook -Software Factories and Domain Specific Languages](https://osherove.com/blog/2005/7/14/audio-interview-steve-cook-software-factories-and-domain-spe.html)

- Jun 8, 2005

    ### [Popping up custom forms in the .NET PropertyGrid control](https://osherove.com/blog/2005/6/8/popping-up-custom-forms-in-the-net-propertygrid-control.html)

- May 23, 2005

    ### [UISafeInvoker: Making UI Thread safe methods - a little more easily](https://osherove.com/blog/2005/5/23/uisafeinvoker-making-ui-thread-safe-methods-a-little-more-ea.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
