JoJoCa
JoJoCa
CC#
Created by JoJoCa on 8/13/2023 in #help
✅ Cant build a docker file
5 replies
CC#
Created by JoJoCa on 8/8/2023 in #help
✅ dotnet watch not working
im trying to run a mod that works using the api for a minecraft server, though when I try to run the main API using the dotnet watch commad in my terminal I get this
dotnet watch :x: Error(s) finding watch items project file 'SkyApi.csproj'
dotnet watch :watch: MSBuild output from target 'GenerateWatchList':
dotnet watch :watch:
dotnet watch :watch: Build started 08/08/2023 16:24:26.
dotnet watch :watch: 1>Project "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" on node 1 (GenerateWatchList target(s)).
dotnet watch :watch: 1>Project "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" (1) is building "C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj" (3) on node 2 (_CollectWatchItems target(s)).
dotnet watch :watch: 3>C:\Program Files\dotnet\sdk\7.0.306\DotnetTools\dotnet-watch\7.0.306-servicing.23321.40\tools\net7.0\any\DotNetWatch.targets(92,5): error MSB3202: The project file "../websocket-sharp/websocket-sharp/websocket-sharp.csproj" was not found. [C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj]
dotnet watch :watch: 3>Done Building Project "C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj" (_CollectWatchItems target(s)) -- FAILED.
dotnet watch :watch: 1>Done Building Project "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" (GenerateWatchList target(s)) -- FAILED.
dotnet watch :watch: Build FAILED.
dotnet watch :watch: "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" (GenerateWatchList target) (1) ->
dotnet watch :watch: "C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj" (_CollectWatchItems target) (3) ->
dotnet watch :watch: (_CoreCollectWatchItems target) ->
dotnet watch :watch: C:\Program Files\dotnet\sdk\7.0.306\DotnetTools\dotnet-watch\7.0.306-servicing.23321.40\tools\net7.0\any\DotNetWatch.targets(92,5): error MSB3202: The project file "../websocket-sharp/websocket-sharp/websocket-sharp.csproj" was not found. [C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj]
dotnet watch :watch: 0 Warning(s)
dotnet watch :watch: 1 Error(s)
dotnet watch :watch: Time Elapsed 00:00:01.99
dotnet watch :watch:
dotnet watch :x: Error(s) finding watch items project file 'SkyApi.csproj'
dotnet watch :watch: MSBuild output from target 'GenerateWatchList':
dotnet watch :watch:
dotnet watch :watch: Build started 08/08/2023 16:24:26.
dotnet watch :watch: 1>Project "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" on node 1 (GenerateWatchList target(s)).
dotnet watch :watch: 1>Project "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" (1) is building "C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj" (3) on node 2 (_CollectWatchItems target(s)).
dotnet watch :watch: 3>C:\Program Files\dotnet\sdk\7.0.306\DotnetTools\dotnet-watch\7.0.306-servicing.23321.40\tools\net7.0\any\DotNetWatch.targets(92,5): error MSB3202: The project file "../websocket-sharp/websocket-sharp/websocket-sharp.csproj" was not found. [C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj]
dotnet watch :watch: 3>Done Building Project "C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj" (_CollectWatchItems target(s)) -- FAILED.
dotnet watch :watch: 1>Done Building Project "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" (GenerateWatchList target(s)) -- FAILED.
dotnet watch :watch: Build FAILED.
dotnet watch :watch: "C:\Users\********\Documents\skyblock\SkyApi\SkyApi.csproj" (GenerateWatchList target) (1) ->
dotnet watch :watch: "C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj" (_CollectWatchItems target) (3) ->
dotnet watch :watch: (_CoreCollectWatchItems target) ->
dotnet watch :watch: C:\Program Files\dotnet\sdk\7.0.306\DotnetTools\dotnet-watch\7.0.306-servicing.23321.40\tools\net7.0\any\DotNetWatch.targets(92,5): error MSB3202: The project file "../websocket-sharp/websocket-sharp/websocket-sharp.csproj" was not found. [C:\Users\********\Documents\skyblock\SkyBackendForFrontend\SkyBackendForFrontend.csproj]
dotnet watch :watch: 0 Warning(s)
dotnet watch :watch: 1 Error(s)
dotnet watch :watch: Time Elapsed 00:00:01.99
dotnet watch :watch:
23 replies
CC#
Created by JoJoCa on 11/4/2022 in #help
Serial reading
I use this code to read the values my arduino reads, and I use that in unity. However the datareceive event never triggers.
public class NewBehaviourScript : MonoBehaviour
{
public string recievedData;
public GameObject cube;
Vector3 rotationVal;
SerialPort microcontroller = new SerialPort("COM4");
void Start()
{


microcontroller.BaudRate = 9600;
microcontroller.Parity = Parity.None;
microcontroller.StopBits = StopBits.One;
microcontroller.DataBits = 8;
microcontroller.Handshake = Handshake.None;
microcontroller.RtsEnable = true;
microcontroller.DtrEnable = true;
microcontroller.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);

microcontroller.Open();


}

private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e)
{

SerialPort sp = (SerialPort)sender;
Debug.Log("Recieving");
string data = sp.ReadLine();
rotationVal = new Vector3(0, float.Parse(data), 0);
}

void Update()
{
cube.transform.eulerAngles = rotationVal;
}

}
public class NewBehaviourScript : MonoBehaviour
{
public string recievedData;
public GameObject cube;
Vector3 rotationVal;
SerialPort microcontroller = new SerialPort("COM4");
void Start()
{


microcontroller.BaudRate = 9600;
microcontroller.Parity = Parity.None;
microcontroller.StopBits = StopBits.One;
microcontroller.DataBits = 8;
microcontroller.Handshake = Handshake.None;
microcontroller.RtsEnable = true;
microcontroller.DtrEnable = true;
microcontroller.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);

microcontroller.Open();


}

private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e)
{

SerialPort sp = (SerialPort)sender;
Debug.Log("Recieving");
string data = sp.ReadLine();
rotationVal = new Vector3(0, float.Parse(data), 0);
}

void Update()
{
cube.transform.eulerAngles = rotationVal;
}

}
I've also tried just doing a Readline in the update method, which worked but it took about 30 seconds or more before my code read the changes my arduino received.
1 replies