dotnet / dotnet/machinelearning-modelbuilder

error CS0103: The name 'File' does not exist in the current context

Open
#2,503 2 comments 0 reactions 1 assignee Claimed by @zewditu View on GitHub
GS Tutorial Priority:0 Stale
Dominant language
Dockerfile
Stars
285
Forks
66
PR merge metrics
No merged PRs in 30d

Description

**System Information (please complete the following information):**
- Model Builder or CLI Version: 16.14.3
- Visual Studio Version (if applicable):

**Describe the bug**
- On which page of the tutorial did you run into an issue (URL):https://dotnet.microsoft.com/en-us/learn/ml-dotnet/get-started-tutorial/consume

- Clear description of the problem:
While running SentimentModel.ConsoleApp in the terminal using 'dotnet run' command. It gives the following error.

~/myMLApp/SentimentModel/SentimentModel.training.cs(62,29): error CS0103: The name 'File' does not exist in the current ~/myMLApp/SentimentModel/SentimentModel.csproj]

The build failed. Fix the build errors and run again.

**To Reproduce**
Steps to reproduce the behavior:
1. Following steps in URL https://dotnet.microsoft.com/en-us/learn/ml-dotnet/get-started-tutorial/consume
2. In step 3 run the console application using dotnet run
4. See the error: ~/myMLApp/SentimentModel/SentimentModel.training.cs(62,29): error CS0103: The name 'File' does not exist in the current ~/myMLApp/SentimentModel/SentimentModel.csproj]

**Expected behavior**
The console app should run without error

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Possible solution: Add 'using System.IO;' in SentimentModel/SentimentModel.training.cs file

![Screenshot 2023-02-21 at 1 26 26 AM](https://user-images.githubusercontent.com/37655308/220189475-5a25be35-3076-47bc-a750-4808d8e33037.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.