I'm not sure if you have the same problem that I had. I have a .NET Core project that is running on Windows, but when I tried to run the project on macOS I was getting the error message:
error MSB3552: Resource file "**/*.resx" cannot be found".
In my project, I have a config to store the log files in the folder
"WriteTo": [
{
"Name": "RollingFileAlternate",
"Args": {
"logDirectory": ".\\Logs",
"fileSizeLimitBytes": 10485760
}
}
]
The first time I run the project, this will create a folder named Logs
, but when I run on macOS it will create a hidden folder named .\Logs
. So this is a problem, as after that the project will get that error when building.
The solution is to change the config to:
"WriteTo": [
{
"Name": "RollingFileAlternate",
"Args": {
"logDirectory": "Logs",
"fileSizeLimitBytes": 10485760
}
}
]
Now, the project can run on macOS.
Because Windows uses the backslash in the directory path, but macOS uses the slash, when you need to build the project in Windows for macOS, you should check all of code related to files, folder, and paths (e.g., the code to create the folder to save log files, create the folder to save upload files, etc.).