Olsson
Olsson
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
another partial?
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
Yea, been thinking of something similar like this.
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
So I'll research further, thank you guys for the help though! 😄
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
It's still not how I want it 😅
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
Not how I want the syntax to be for this scripting layer of the engine
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
That's not gonna cut it. I'll research further
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
I'm not modifying the original source file
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
I don't see how this can be achieved with source generators
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
// User facing
[ServerCall]
public void MyServerCall()
{
// User code logic
}

// Compiled
{
[ServerCall]
public void MyServerCall()
{
// RPC logic to send the event to the server
}

public void MyServerCall_ActualImplementation()
{
// User code logic
}
}
// User facing
[ServerCall]
public void MyServerCall()
{
// User code logic
}

// Compiled
{
[ServerCall]
public void MyServerCall()
{
// RPC logic to send the event to the server
}

public void MyServerCall_ActualImplementation()
{
// User code logic
}
}
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
For functions it wouldn't work, RPC calls needs to be rewritten
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
You can't modify the code in place, as you said. I need to modify the file
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
Source generators would not work for my use case
38 replies
CC#
Created by Olsson on 4/26/2025 in #help
Create MSBuild custom task to modify C# files before compilation
I'm integrating C# into a game engine, and need the user written C# properties to fetch the value in memory from C++. I could use Mono.Cecil to weave the instructions, but it's very cumbersome
38 replies