Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

The Perils Of The Bleeding Edge in .NET Core

August 1, 2017
Don Schenck

    Let's face it: As developers, many of us enjoy being on the leading -- or, better -- the bleeding edge of technology. Whether it's because it's fun to learn new things, or for bragging rights at the local user group, or because we want to keep our "career sword" sharpened, the bleeding edge is guaranteed to bring excitement to our days. Sure beats maintaining VB6 code.

    But with that excitement comes the reason for the term "bleeding edge"; death by a thousand cuts.

    I still have the stinging from one of those tiny cuts I suffered recently.

    The Objective

    I decided that I would write a blog post (and make a video) about using Visual Studio 2017  (VS 2017) to create an application and then run it in Red Hat OpenShift. I wanted to demonstrate how you could stay in Visual Studio yet have your code running in a Linux container inside OpenShift, complete with a zero downtime rolling update of the code.

    Setting Up

    The first thing I did was to create a repository in GitHub to hold my code. This would allow OpenShift to pull the code from GitHub and automatically build and deploy it. All I had to do was push the code from Visual Studio to the repo, and OpenShift would be triggered by a webhook to start building.

    After creating an empty repo -- containing the README and LICENSE files -- I cloned it to a directory I share between my Windows machine and my Red Hat virtual machine. The directory is named "shared", so I cloned it into "/shared/locationms".

    Blocker

    I then realized that I'm using the .NET Core 2.0 Preview 2 bits on my Red Hat Enterprise Linux (RHEL) Virtual Machine (VM), and because it's not generally available, then OpenShift.com wouldn't support .NET Core 2.0 yet. No problem; I'll simply write the code in Visual Studio and then run it in my RHEL VM at the command line. That will at least get me closer to the experience I want: Working in Visual Studio and running in OpenShift.

    I fired up my IDE and started down the path to create a .NET Core 2.0 web API application when I realized that VS 2017 only supports .NET Core 1.0 and 1.1. No option for version 2.0.

    Some web searching turned up the Early Access to Visual Studio Preview -- the latest bits. Talk about bleeding edge...

    Running On Windows

    I installed VS 2017 Preview version 15.3 and started it. There it was: the .NET Core 2.0 option for creating a web API. Since I already had .NET Core 2 Preview 2 installed on my RHEL VM, this would be easy: I'd create a new project in VS 2017, save it to a directory I share between my Windows machine and my VM, and then switch over to the VM to run it. I created the web API app and ran it from the IDE; no problems.

    Running On RHEL

    I closed down Visual Studio and hot-keyed over to my VM. Navigating to the /shared/locationms directory, I saw something I wasn't expecting. Nothing bad, mind you, just unexpected. The actual code for my app wasn't in /shared/locationms; it was in /shared/locationms/locationms. This second directory was a result of Visual Studio's default behavior. Noted.

    This is when things went downhill. I ran dotnet restore to make sure the dependencies were fine, and they weren't. I got the following error:

    Odd. I know my two systems weren't at the exact same version, but I thought they were close enough: 2.0.0-preview2-006900 for my Windows system, 2.0.0-preview2-006497 for my RHEL VM.

    The Fix

    So there's a disconnect; Visual Studio was using a newer version of .NET Core. While not a perfect solution, I edited my locationms.csproj file, changing the following two lines. In both cases, I changed the version to "2.0.0-*".

    After that, I ran dotnet restore again and this time it worked. Following with dotnet run yielded success on my RHEL VM:

    Trading Places

    When I returned to Visual Studio in Windows, now it did not run. I had to revert back to the original locationms.csproj file in order to make it work.

    The Takeaway

    When you work with preview code or beta bits, sometimes things get broken. Rest assured, this all will work in the final release. Until then, be aware that a dynamic development effort can result in challenges. And tiny cuts.

    Last updated: July 31, 2017

    Recent Posts

    • Trusted software factory: Building trust in the agentic AI era

    • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

    • Red Hat Hardened Images: Top 5 benefits for software developers

    • How EvalHub manages two-layer Kubernetes control planes

    • Tekton joins the CNCF as an incubating project

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.