mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-01-02 14:29:56 +01:00
Added item for failure to build.
This commit is contained in:
parent
d0001b3293
commit
dfaa2dc670
|
|
@ -6,6 +6,6 @@ If you find any mistakes in the seventh edition, *C# 11 and .NET 7 - Modern Cros
|
|||
|
||||
[**Improvements** (35 items)](improvements.md): Changes to text or code that would improve the content. These are optional.
|
||||
|
||||
[**Common Errors** (4 items)](common-errors.md): These are some of the most common errors that a reader might encounter when trying to get code in book tasks to work, or when trying to write your own code.
|
||||
[**Common Errors** (5 items)](common-errors.md): These are some of the most common errors that a reader might encounter when trying to get code in book tasks to work, or when trying to write your own code.
|
||||
|
||||
All errata and improvements will be included in the 8th edition planned for publishing in November 2023. To be included they must be submitted by mid-September 2023.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
**Common Errors and How to Fix Them** (4 items)
|
||||
**Common Errors and How to Fix Them** (5 items)
|
||||
|
||||
If you have suggestions for other common errors, then please [raise an issue in this repository](https://github.com/markjprice/cs12dotnet8/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
- [MSB3026/MSB3027 Cannot rebuild/compile a project](#msb3026msb3027-cannot-rebuildcompile-a-project)
|
||||
- [Missing types and members in a utility class](#missing-types-and-members-in-a-utility-class)
|
||||
- [CS0103 The name 'DoSomething' does not exist in the current context](#cs0103-the-name-dosomething-does-not-exist-in-the-current-context)
|
||||
- [CS0122 'Util.DoSomething()' is inaccessible due to its protection level](#cs0122-utildosomething-is-inaccessible-due-to-its-protection-level)
|
||||
|
|
@ -10,6 +11,26 @@ If you have suggestions for other common errors, then please [raise an issue in
|
|||
- [Microsoft introduces a bug in a later version](#microsoft-introduces-a-bug-in-a-later-version)
|
||||
- [Service not started when you try to call it](#service-not-started-when-you-try-to-call-it)
|
||||
|
||||
# MSB3026/MSB3027 Cannot rebuild/compile a project
|
||||
|
||||
While actively working on a project, you often run an app, it "crashes", you make a code change, recompile, and run it again. Sometimes recompiling will fail with the following warning:
|
||||
```
|
||||
Warning MSB3026 Could not copy "C:\cs11dotnet7\Chapter02\Ch02Ex03Numbers\obj\Debug\net7.0\apphost.exe" to "bin\Debug\net7.0\Ch02Ex03Numbers.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\net7.0\Ch02Ex03Numbers.exe' because it is being used by another process. The file is locked by: "Ch02Ex03Numbers (9728)"
|
||||
```
|
||||
|
||||
By default, the warning repeats ten times and then you will see the following error:
|
||||
```
|
||||
Error MSB3027 Could not copy "C:\cs11dotnet7\Chapter02\Ch02Ex03Numbers\obj\Debug\net7.0\apphost.exe" to "bin\Debug\net7.0\Ch02Ex03Numbers.exe". Exceeded retry count of 10. Failed. The file is locked by: "Ch02Ex03Numbers (9728)"
|
||||
```
|
||||
|
||||
These messages tell you that you are still running the old console app process so that the build process cannot copy the new version over the old version.
|
||||
|
||||
To solve this problem, close the running console app.
|
||||
|
||||
If you cannot find the console app to close it, then it might still be running but not visible in the operating system.
|
||||
|
||||
To solve this problem, reboot your computer.
|
||||
|
||||
# Missing types and members in a utility class
|
||||
|
||||
## CS0103 The name 'DoSomething' does not exist in the current context
|
||||
|
|
|
|||
Loading…
Reference in a new issue